home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic 5 Developer's Kit / vb5 dev kit.iso / dev / t2win-32 / _langage.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-08-24  |  10.8 KB  |  320 lines

  1. VERSION 4.00
  2. Begin VB.Form frmLanguage 
  3.    BorderStyle     =   4  'Fixed ToolWindow
  4.    Caption         =   "Language"
  5.    ClientHeight    =   4395
  6.    ClientLeft      =   1890
  7.    ClientTop       =   3270
  8.    ClientWidth     =   7170
  9.    Height          =   4800
  10.    Left            =   1830
  11.    MaxButton       =   0   'False
  12.    MDIChild        =   -1  'True
  13.    ScaleHeight     =   4395
  14.    ScaleWidth      =   7170
  15.    ShowInTaskbar   =   0   'False
  16.    Top             =   2925
  17.    Width           =   7290
  18.    Begin VB.ListBox List1 
  19.       Height          =   1035
  20.       Left            =   105
  21.       TabIndex        =   9
  22.       Top             =   3255
  23.       Width           =   6945
  24.    End
  25.    Begin VB.TextBox txt_Result 
  26.       BackColor       =   &H00C0C0C0&
  27.       BorderStyle     =   0  'None
  28.       Height          =   855
  29.       Left            =   105
  30.       Locked          =   -1  'True
  31.       MultiLine       =   -1  'True
  32.       ScrollBars      =   2  'Vertical
  33.       TabIndex        =   7
  34.       Top             =   630
  35.       Width           =   6945
  36.    End
  37.    Begin VB.Frame Frame1 
  38.       Caption         =   "Some objects"
  39.       Height          =   1275
  40.       Left            =   2625
  41.       TabIndex        =   3
  42.       Top             =   1575
  43.       Width           =   4425
  44.       Begin VB.TextBox Text1 
  45.          Height          =   330
  46.          Left            =   2415
  47.          TabIndex        =   8
  48.          Text            =   "Standard Text"
  49.          Top             =   735
  50.          Width           =   1800
  51.       End
  52.       Begin VB.CommandButton Command1 
  53.          Caption         =   "Standard Command"
  54.          Height          =   330
  55.          Left            =   210
  56.          TabIndex        =   4
  57.          Top             =   315
  58.          Width           =   1905
  59.       End
  60.       Begin Threed.SSCheck SSCheck1 
  61.          Height          =   330
  62.          Left            =   2415
  63.          TabIndex        =   6
  64.          Top             =   315
  65.          Width           =   1695
  66.          _Version        =   65536
  67.          _ExtentX        =   2990
  68.          _ExtentY        =   582
  69.          _StockProps     =   78
  70.          Caption         =   "OLE Check"
  71.          Font3D          =   1
  72.       End
  73.       Begin Threed.SSCommand SSCommand2 
  74.          Height          =   330
  75.          Left            =   210
  76.          TabIndex        =   5
  77.          Top             =   735
  78.          Width           =   1905
  79.          _Version        =   65536
  80.          _ExtentX        =   3360
  81.          _ExtentY        =   582
  82.          _StockProps     =   78
  83.          Caption         =   "OLE Command"
  84.          Font3D          =   1
  85.          RoundedCorners  =   0   'False
  86.       End
  87.    End
  88.    Begin Threed.SSFrame SSFrame1 
  89.       Height          =   1275
  90.       Index           =   1
  91.       Left            =   105
  92.       TabIndex        =   0
  93.       Tag             =   "Tag for SSFrame1"
  94.       Top             =   1575
  95.       Width           =   2325
  96.       _Version        =   65536
  97.       _ExtentX        =   4101
  98.       _ExtentY        =   2249
  99.       _StockProps     =   14
  100.       Caption         =   "&Select a language"
  101.       Begin Threed.SSOption SSOption1 
  102.          Height          =   225
  103.          Index           =   1
  104.          Left            =   210
  105.          TabIndex        =   2
  106.          Top             =   840
  107.          Width           =   1905
  108.          _Version        =   65536
  109.          _ExtentX        =   3360
  110.          _ExtentY        =   397
  111.          _StockProps     =   78
  112.          Caption         =   "&French"
  113.       End
  114.       Begin Threed.SSOption SSOption1 
  115.          Height          =   225
  116.          Index           =   0
  117.          Left            =   210
  118.          TabIndex        =   1
  119.          Top             =   420
  120.          Width           =   1905
  121.          _Version        =   65536
  122.          _ExtentX        =   3360
  123.          _ExtentY        =   397
  124.          _StockProps     =   78
  125.          Caption         =   "&English"
  126.          Value           =   -1  'True
  127.       End
  128.    End
  129.    Begin Threed.SSPanel SSPanel1 
  130.       Align           =   1  'Align Top
  131.       Height          =   480
  132.       Left            =   0
  133.       TabIndex        =   11
  134.       Top             =   0
  135.       Width           =   7170
  136.       _Version        =   65536
  137.       _ExtentX        =   12647
  138.       _ExtentY        =   847
  139.       _StockProps     =   15
  140.       ForeColor       =   -2147483640
  141.       BackColor       =   12632256
  142.       Begin VB.ComboBox cmb_Function 
  143.          Height          =   315
  144.          Left            =   1995
  145.          TabIndex        =   12
  146.          Top             =   90
  147.          Width           =   3840
  148.       End
  149.       Begin Threed.SSCommand cmdNP 
  150.          Height          =   300
  151.          Index           =   1
  152.          Left            =   6825
  153.          TabIndex        =   16
  154.          Top             =   90
  155.          Width           =   255
  156.          _Version        =   65536
  157.          _ExtentX        =   450
  158.          _ExtentY        =   529
  159.          _StockProps     =   78
  160.          Caption         =   ">"
  161.          BevelWidth      =   1
  162.          Font3D          =   3
  163.          RoundedCorners  =   0   'False
  164.          Outline         =   0   'False
  165.       End
  166.       Begin Threed.SSCommand cmdNP 
  167.          Height          =   300
  168.          Index           =   0
  169.          Left            =   5985
  170.          TabIndex        =   15
  171.          Top             =   90
  172.          Width           =   255
  173.          _Version        =   65536
  174.          _ExtentX        =   450
  175.          _ExtentY        =   529
  176.          _StockProps     =   78
  177.          Caption         =   "<"
  178.          BevelWidth      =   1
  179.          Font3D          =   3
  180.          RoundedCorners  =   0   'False
  181.          Outline         =   0   'False
  182.       End
  183.       Begin VB.Label Label2 
  184.          Caption         =   "&Select a function"
  185.          Height          =   255
  186.          Left            =   90
  187.          TabIndex        =   14
  188.          Top             =   120
  189.          Width           =   1815
  190.       End
  191.       Begin Threed.SSCommand SSCommand1 
  192.          Default         =   -1  'True
  193.          Height          =   300
  194.          Left            =   6300
  195.          TabIndex        =   13
  196.          Top             =   90
  197.          Width           =   465
  198.          _Version        =   65536
  199.          _ExtentX        =   820
  200.          _ExtentY        =   529
  201.          _StockProps     =   78
  202.          Caption         =   "&Go"
  203.          BevelWidth      =   1
  204.          RoundedCorners  =   0   'False
  205.          Outline         =   0   'False
  206.       End
  207.    End
  208.    Begin VB.Label Label1 
  209.       Caption         =   "Contents of the language file"
  210.       Height          =   225
  211.       Left            =   105
  212.       TabIndex        =   10
  213.       Top             =   2940
  214.       Width           =   6945
  215.    End
  216. Attribute VB_Name = "frmLanguage"
  217. Attribute VB_Creatable = False
  218. Attribute VB_Exposed = False
  219. Option Explicit
  220. Option Base 1
  221. Private Const Iteration = 10
  222. Dim IsLoaded         As Integer
  223. Dim TimerStartOk     As Integer
  224. Dim TimerCloseOk     As Integer
  225. Dim TimerHandle      As Integer
  226. Dim TimerValue       As Long
  227. Private Sub cmdNP_Click(Index As Integer)
  228.    Call sub_NextPrev(cmb_Function, Index)
  229. End Sub
  230. Private Sub cmb_Function_Click()
  231.    If (IsLoaded = False) Then Exit Sub
  232.    Call cDisableFI(mdiT2W.Picture1)
  233.    txt_Result = ""
  234.    DoEvents
  235.    Select Case cmb_Function.ListIndex
  236.       Case 0
  237.          Call TestReadSaveCtlLanguage
  238.       Case 1
  239.          Call TestReadSaveCtlLanguageExt
  240.    End Select
  241.    DoEvents
  242.    Call cEnableFI(mdiT2W.Picture1)
  243. End Sub
  244. Private Sub Form_Activate()
  245.    mdiT2W.Label2.Caption = cInsertBlocks(mdiT2W.Label2.Tag, "" & Iteration)
  246. End Sub
  247. Private Sub Form_Load()
  248.    Dim intResult        As Integer
  249.    IsLoaded = False
  250.    Show
  251.    Call sub_Load_Combo(cmb_Function, T2WDirInst + "_langage.t2w")
  252.    intResult = cChDir(T2WDirTest)
  253.    IsLoaded = True
  254. End Sub
  255. Private Sub SSCommand1_Click()
  256.    Call cmb_Function_Click
  257. End Sub
  258. Private Sub TestReadSaveCtlLanguage()
  259.    Dim intResult        As Integer
  260.    Dim strResult        As String
  261.    Dim strDisplay       As String
  262.    Dim i                As Integer
  263.    Dim File1            As String
  264.    strResult = ""
  265.    strDisplay = ""
  266.    Call cObjectMethod(List1, "clear", "")
  267.    File1 = T2WDirTest + "\save control language.test"
  268.    strDisplay = strDisplay & "SaveCtlLanguage of this Form is '" & cSaveCtlLanguage(Me, 255, File1) & "'" & vbCrLf
  269.    strDisplay = strDisplay & "ReadCtlLanguage of this Form is '" & cReadCtlLanguage(Me, 255, File1) & "'" & vbCrLf
  270.    strDisplay = strDisplay & "Load file '" & File1 & "' into the list box 'List1' is '" & cFileToListBox(List1.hWnd, File1) & "'"
  271.    txt_Result = strDisplay
  272.    'time the function
  273.    TimerHandle = cTimerOpen()
  274.    TimerStartOk = cTimerStart(TimerHandle)
  275.    For i = 1 To Iteration
  276.       intResult = cReadCtlLanguage(Me, 1, File1)
  277.    Next i
  278.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  279.    TimerCloseOk = cTimerClose(TimerHandle)
  280. End Sub
  281. Private Sub TestReadSaveCtlLanguageExt()
  282.    Dim intResult        As Integer
  283.    Dim strResult        As String
  284.    Dim strDisplay       As String
  285.    Dim i                As Integer
  286.    Dim File1            As String
  287.    strResult = ""
  288.    strDisplay = ""
  289.    Call cObjectMethod(List1, "clear", "")
  290.    File1 = T2WDirTest + "\save control language extended.test"
  291.    strDisplay = strDisplay & "SaveCtlLanguageExt of this Form is '" & cSaveCtlLanguageExt(Me, 255, File1) & "'" & vbCrLf
  292.    strDisplay = strDisplay & "ReadCtlLanguageExt of this Form is '" & cReadCtlLanguageExt(Me, 255, File1) & "'" & vbCrLf
  293.    strDisplay = strDisplay & "Load file '" & File1 & "' into the list box 'List1' is '" & cFileToListBox(List1.hWnd, File1) & "'"
  294.    txt_Result = strDisplay
  295.    'time the function
  296.    TimerHandle = cTimerOpen()
  297.    TimerStartOk = cTimerStart(TimerHandle)
  298.    For i = 1 To Iteration
  299.       intResult = cReadCtlLanguageExt(Me, 1, File1)
  300.    Next i
  301.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  302.    TimerCloseOk = cTimerClose(TimerHandle)
  303. End Sub
  304. Private Sub SSOption1_Click(Index As Integer, Value As Integer)
  305.    Dim intResult        As Integer
  306.    If (cmb_Function.ListIndex = 0) Then
  307.       If (Index = 0) Then
  308.          intResult = cReadCtlLanguage(Me, 255, T2WDirInst + "!languk1.T2W")
  309.       Else
  310.          intResult = cReadCtlLanguage(Me, 255, T2WDirInst + "!langfr1.T2W")
  311.       End If
  312.    Else
  313.       If (Index = 0) Then
  314.          intResult = cReadCtlLanguageExt(Me, 255, T2WDirInst + "!languk2.T2W")
  315.       Else
  316.          intResult = cReadCtlLanguageExt(Me, 255, T2WDirInst + "!langfr2.T2W")
  317.       End If
  318.    End If
  319. End Sub
  320.