home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hot Shareware 35
/
hot35.iso
/
ficheros
/
LVB
/
T2W32543.ZIP
/
_LANGAGE.FRM
< prev
next >
Wrap
Text File
|
1998-05-21
|
9KB
|
336 lines
VERSION 5.00
Begin VB.Form frmLanguage
BorderStyle = 4 'Fixed ToolWindow
Caption = "Language"
ClientHeight = 4395
ClientLeft = 1890
ClientTop = 3270
ClientWidth = 7170
MaxButton = 0 'False
MDIChild = -1 'True
PaletteMode = 1 'UseZOrder
ScaleHeight = 4395
ScaleWidth = 7170
ShowInTaskbar = 0 'False
Begin VB.Frame Frame3
Caption = "&Select a language"
Height = 1275
Left = 90
TabIndex = 14
Top = 1620
Width = 2445
Begin VB.OptionButton Option1
Caption = "&English"
Height = 195
Index = 0
Left = 270
TabIndex = 16
Top = 450
Value = -1 'True
Width = 1275
End
Begin VB.OptionButton Option1
Caption = "&French"
Height = 195
Index = 1
Left = 270
TabIndex = 15
Top = 900
Width = 1275
End
End
Begin VB.CheckBox Check1
Caption = "OLE Check"
Height = 195
Left = 5040
TabIndex = 12
Top = 1980
Width = 1725
End
Begin VB.Frame Frame2
Height = 570
Left = 0
TabIndex = 6
Top = -90
Width = 7170
Begin VB.CommandButton cmdNP
Caption = ">"
Height = 285
Index = 1
Left = 6750
TabIndex = 11
Top = 195
Width = 285
End
Begin VB.CommandButton cmdNP
Caption = "<"
Height = 285
Index = 0
Left = 5850
TabIndex = 10
Top = 195
Width = 285
End
Begin VB.CommandButton Command1
Caption = "&Go"
Default = -1 'True
Height = 285
Left = 6210
TabIndex = 9
Top = 195
Width = 465
End
Begin VB.ComboBox cmb_Function
Height = 315
Left = 1365
TabIndex = 7
Top = 180
Width = 4395
End
Begin VB.Label Label2
Caption = "&Select a function"
Height = 255
Left = 90
TabIndex = 8
Top = 210
Width = 1275
End
End
Begin VB.ListBox List1
Height = 1035
Left = 105
TabIndex = 4
Top = 3255
Width = 6945
End
Begin VB.TextBox txt_Result
BackColor = &H00C0C0C0&
BorderStyle = 0 'None
Height = 855
Left = 105
Locked = -1 'True
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 2
Top = 630
Width = 6945
End
Begin VB.Frame Frame1
Caption = "Some objects"
Height = 1275
Left = 2610
TabIndex = 0
Top = 1620
Width = 4425
Begin VB.CommandButton Command2
Caption = "OLE Command"
Height = 375
Left = 180
TabIndex = 13
Top = 720
Width = 1905
End
Begin VB.TextBox Text1
Height = 330
Left = 2415
TabIndex = 3
Text = "Standard Text"
Top = 735
Width = 1800
End
Begin VB.CommandButton Command3
Caption = "Standard Command"
Height = 375
Left = 180
TabIndex = 1
Top = 270
Width = 1905
End
End
Begin VB.Label Label1
Caption = "Contents of the language file"
Height = 225
Left = 105
TabIndex = 5
Top = 2940
Width = 6945
End
End
Attribute VB_Name = "frmLanguage"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Option Base 1
Private Const Iteration = 10
Dim IsLoaded As Integer
Dim TimerStartOk As Integer
Dim TimerCloseOk As Integer
Dim TimerHandle As Integer
Dim TimerValue As Long
Private Sub cmdNP_Click(Index As Integer)
Call sub_NextPrev(cmb_Function, Index)
End Sub
Private Sub cmb_Function_Click()
If (IsLoaded = False) Then Exit Sub
Call cDisableFI(mdiT2W.Picture1)
txt_Result = ""
DoEvents
Select Case cmb_Function.ListIndex
Case 0
Call TestReadSaveCtlLanguage
Case 1
Call TestReadSaveCtlLanguageExt
End Select
DoEvents
Call cEnableFI(mdiT2W.Picture1)
End Sub
Private Sub Form_Activate()
mdiT2W.Label2.Caption = cInsertBlocks(mdiT2W.Label2.Tag, "" & Iteration)
End Sub
Private Sub Form_Load()
Dim intResult As Integer
IsLoaded = False
Show
Call sub_Load_Combo(cmb_Function, T2WDirInst + "_langage.t2w")
intResult = cChDir(T2WDirTest)
IsLoaded = True
End Sub
Private Sub Command1_Click()
Call cmb_Function_Click
End Sub
Private Sub TestReadSaveCtlLanguage()
Dim intResult As Integer
Dim strResult As String
Dim strDisplay As String
Dim i As Integer
Dim File1 As String
strResult = ""
strDisplay = ""
Call cObjectMethod(List1, "clear", "")
File1 = T2WDirTest + "\save control language.test"
strDisplay = strDisplay & "SaveCtlLanguage of this Form is '" & cSaveCtlLanguage(Me, 255, File1) & "'" & vbCrLf
strDisplay = strDisplay & "ReadCtlLanguage of this Form is '" & cReadCtlLanguage(Me, 255, File1) & "'" & vbCrLf
strDisplay = strDisplay & "Load file '" & File1 & "' into the list box 'List1' is '" & cFileToListBox(List1.hwnd, File1) & "'"
txt_Result = strDisplay
'time the function
TimerHandle = cTimerOpen()
TimerStartOk = cTimerStart(TimerHandle)
For i = 1 To Iteration
intResult = cReadCtlLanguage(Me, 1, File1)
Next i
mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
TimerCloseOk = cTimerClose(TimerHandle)
End Sub
Private Sub TestReadSaveCtlLanguageExt()
Dim intResult As Integer
Dim strResult As String
Dim strDisplay As String
Dim i As Integer
Dim File1 As String
strResult = ""
strDisplay = ""
Call cObjectMethod(List1, "clear", "")
File1 = T2WDirTest + "\save control language extended.test"
strDisplay = strDisplay & "SaveCtlLanguageExt of this Form is '" & cSaveCtlLanguageExt(Me, 255, File1) & "'" & vbCrLf
strDisplay = strDisplay & "ReadCtlLanguageExt of this Form is '" & cReadCtlLanguageExt(Me, 255, File1) & "'" & vbCrLf
strDisplay = strDisplay & "Load file '" & File1 & "' into the list box 'List1' is '" & cFileToListBox(List1.hwnd, File1) & "'"
txt_Result = strDisplay
'time the function
TimerHandle = cTimerOpen()
TimerStartOk = cTimerStart(TimerHandle)
For i = 1 To Iteration
intResult = cReadCtlLanguageExt(Me, 1, File1)
Next i
mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
TimerCloseOk = cTimerClose(TimerHandle)
End Sub
Private Sub Option1_Click(Index As Integer)
Dim intResult As Integer
If (cmb_Function.ListIndex = 0) Then
If (Index = 0) Then
intResult = cReadCtlLanguage(Me, 255, T2WDirInst + "!languk1.T2W")
Else
intResult = cReadCtlLanguage(Me, 255, T2WDirInst + "!langfr1.T2W")
End If
Else
If (Index = 0) Then
intResult = cReadCtlLanguageExt(Me, 255, T2WDirInst + "!languk2.T2W")
Else
intResult = cReadCtlLanguageExt(Me, 255, T2WDirInst + "!langfr2.T2W")
End If
End If
End Sub