home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hot Shareware 35
/
hot35.iso
/
ficheros
/
LVB
/
T2W32543.ZIP
/
_DMLANG.FRM
< prev
next >
Wrap
Text File
|
1998-05-21
|
11KB
|
489 lines
VERSION 5.00
Begin VB.Form frmDayMonth
BorderStyle = 4 'Fixed ToolWindow
Caption = "Days and months in different language"
ClientHeight = 5025
ClientLeft = 1890
ClientTop = 3255
ClientWidth = 9000
MaxButton = 0 'False
MDIChild = -1 'True
PaletteMode = 1 'UseZOrder
ScaleHeight = 5025
ScaleWidth = 9000
ShowInTaskbar = 0 'False
Begin VB.Frame Frame1
Height = 570
Left = 0
TabIndex = 1
Top = -90
Width = 9000
Begin VB.CommandButton cmdNP
Caption = ">"
Height = 285
Index = 1
Left = 8640
TabIndex = 6
Top = 195
Width = 285
End
Begin VB.CommandButton cmdNP
Caption = "<"
Height = 285
Index = 0
Left = 7740
TabIndex = 5
Top = 195
Width = 285
End
Begin VB.CommandButton Command1
Caption = "&Go"
Default = -1 'True
Height = 285
Left = 8100
TabIndex = 4
Top = 195
Width = 465
End
Begin VB.ComboBox cmb_Function
Height = 315
Left = 1365
TabIndex = 2
Top = 180
Width = 6285
End
Begin VB.Label Label2
Caption = "&Select a function"
Height = 255
Left = 90
TabIndex = 3
Top = 210
Width = 1275
End
End
Begin VB.TextBox txt_Result
BackColor = &H00C0C0C0&
BorderStyle = 0 'None
Height = 4290
Left = 180
Locked = -1 'True
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 0
Top = 630
Width = 8730
End
End
Attribute VB_Name = "frmDayMonth"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Option Base 1
Private Const Iteration = 250
Dim IsLoaded As Integer
Dim TimerStartOk As Integer
Dim TimerCloseOk As Integer
Dim TimerHandle As Integer
Dim TimerValue As Long
Dim Language(LNG_FRENCH To LNG_SWEDISH) As String
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 TestAscTime
Case 1
Call TestTinyDay
Case 2
Call TestSmallDay
Case 3
Call TestShortDay
Case 4
Call TestLongDay
Case 5
Call TestTinyMonth
Case 6
Call TestShortMonth
Case 7
Call TestLongMonth
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()
IsLoaded = False
Show
Call FillLanguage(Language())
Call sub_Load_Combo(cmb_Function, T2WDirInst + "_dmlang.t2w")
IsLoaded = True
End Sub
Private Sub Command1_Click()
Call cmb_Function_Click
End Sub
Private Sub TestAscTime()
Dim intResult As Integer
Dim strResult As String
Dim strDisplay As String
Dim i As Integer
intResult = 0
strResult = ""
strDisplay = ""
For i = LNG_FRENCH To LNG_SWEDISH
strDisplay = strDisplay + Language(i) + cGetAscTime(i) + vbCrLf + vbCrLf
Next i
txt_Result = strDisplay
'time the function
TimerHandle = cTimerOpen()
TimerStartOk = cTimerStart(TimerHandle)
For i = 1 To Iteration
strResult = cGetAscTime(LNG_FRENCH)
Next i
mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
TimerCloseOk = cTimerClose(TimerHandle)
End Sub
Private Sub TestTinyDay()
Dim intResult As Integer
Dim strResult As String
Dim strDisplay As String
Dim i As Integer
Dim j As Integer
intResult = 0
strResult = ""
strDisplay = ""
For i = LNG_FRENCH To LNG_SWEDISH
strDisplay = strDisplay + Language(i)
For j = 1 To 7
strDisplay = strDisplay + cGetTinyDay(i, j) + " "
Next j
strDisplay = strDisplay + vbCrLf + vbCrLf
Next i
txt_Result = strDisplay
'time the function
TimerHandle = cTimerOpen()
TimerStartOk = cTimerStart(TimerHandle)
For i = 1 To Iteration
strResult = cGetTinyDay(LNG_FRENCH, 1)
Next i
mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
TimerCloseOk = cTimerClose(TimerHandle)
End Sub
Private Sub FillLanguage(arrLanguage() As String)
arrLanguage(LNG_FRENCH) = "French : "
arrLanguage(LNG_DUTCH) = "Dutch : "
arrLanguage(LNG_GERMAN) = "German : "
arrLanguage(LNG_ENGLISH) = "English : "
arrLanguage(LNG_ITALIAN) = "Italian : "
arrLanguage(LNG_SPANISH) = "Spanish : "
arrLanguage(LNG_CATALAN) = "Catalan : "
arrLanguage(LNG_POLISH) = "Polish : "
arrLanguage(LNG_NORWAY) = "Norway : "
arrLanguage(LNG_SWEDISH) = "Swedish : "
End Sub
Private Sub TestSmallDay()
Dim intResult As Integer
Dim strResult As String
Dim strDisplay As String
Dim i As Integer
Dim j As Integer
intResult = 0
strResult = ""
strDisplay = ""
For i = LNG_FRENCH To LNG_SWEDISH
strDisplay = strDisplay + Language(i)
For j = 1 To 7
strDisplay = strDisplay + cGetSmallDay(i, j) + " "
Next j
strDisplay = strDisplay + vbCrLf + vbCrLf
Next i
txt_Result = strDisplay
'time the function
TimerHandle = cTimerOpen()
TimerStartOk = cTimerStart(TimerHandle)
For i = 1 To Iteration
strResult = cGetSmallDay(LNG_FRENCH, 1)
Next i
mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
TimerCloseOk = cTimerClose(TimerHandle)
End Sub
Private Sub TestLongDay()
Dim intResult As Integer
Dim strResult As String
Dim strDisplay As String
Dim i As Integer
Dim j As Integer
intResult = 0
strResult = ""
strDisplay = ""
For i = LNG_FRENCH To LNG_SWEDISH
strDisplay = strDisplay + Language(i)
For j = 1 To 7
strDisplay = strDisplay + cGetLongDay(i, j) + " "
Next j
strDisplay = strDisplay + vbCrLf + vbCrLf
Next i
txt_Result = strDisplay
'time the function
TimerHandle = cTimerOpen()
TimerStartOk = cTimerStart(TimerHandle)
For i = 1 To Iteration
strResult = cGetLongDay(LNG_FRENCH, 1)
Next i
mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
TimerCloseOk = cTimerClose(TimerHandle)
End Sub
Private Sub TestShortDay()
Dim intResult As Integer
Dim strResult As String
Dim strDisplay As String
Dim i As Integer
Dim j As Integer
intResult = 0
strResult = ""
strDisplay = ""
For i = LNG_FRENCH To LNG_SWEDISH
strDisplay = strDisplay + Language(i)
For j = 1 To 7
strDisplay = strDisplay + cGetShortDay(i, j) + " "
Next j
strDisplay = strDisplay + vbCrLf + vbCrLf
Next i
txt_Result = strDisplay
'time the function
TimerHandle = cTimerOpen()
TimerStartOk = cTimerStart(TimerHandle)
For i = 1 To Iteration
strResult = cGetShortDay(LNG_FRENCH, 1)
Next i
mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
TimerCloseOk = cTimerClose(TimerHandle)
End Sub
Private Sub TestTinyMonth()
Dim intResult As Integer
Dim strResult As String
Dim strDisplay As String
Dim i As Integer
Dim j As Integer
intResult = 0
strResult = ""
strDisplay = ""
For i = LNG_FRENCH To LNG_SWEDISH
strDisplay = strDisplay + Language(i)
For j = 1 To 12
strDisplay = strDisplay + cGetTinyMonth(i, j) + " "
Next j
strDisplay = strDisplay + vbCrLf + vbCrLf
Next i
txt_Result = strDisplay
'time the function
TimerHandle = cTimerOpen()
TimerStartOk = cTimerStart(TimerHandle)
For i = 1 To Iteration
strResult = cGetTinyMonth(LNG_FRENCH, 1)
Next i
mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
TimerCloseOk = cTimerClose(TimerHandle)
End Sub
Public Sub TestLongMonth()
Dim intResult As Integer
Dim strResult As String
Dim strDisplay As String
Dim i As Integer
Dim j As Integer
intResult = 0
strResult = ""
strDisplay = ""
For i = LNG_FRENCH To LNG_SWEDISH
strDisplay = strDisplay + Language(i)
For j = 1 To 12
strDisplay = strDisplay + cGetLongMonth(i, j) + " "
Next j
strDisplay = strDisplay + vbCrLf + vbCrLf
Next i
txt_Result = strDisplay
'time the function
TimerHandle = cTimerOpen()
TimerStartOk = cTimerStart(TimerHandle)
For i = 1 To Iteration
strResult = cGetLongMonth(LNG_FRENCH, 1)
Next i
mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
TimerCloseOk = cTimerClose(TimerHandle)
End Sub
Private Sub TestShortMonth()
Dim intResult As Integer
Dim strResult As String
Dim strDisplay As String
Dim i As Integer
Dim j As Integer
intResult = 0
strResult = ""
strDisplay = ""
For i = LNG_FRENCH To LNG_SWEDISH
strDisplay = strDisplay + Language(i)
For j = 1 To 12
strDisplay = strDisplay + cGetShortMonth(i, j) + " "
Next j
strDisplay = strDisplay + vbCrLf + vbCrLf
Next i
txt_Result = strDisplay
'time the function
TimerHandle = cTimerOpen()
TimerStartOk = cTimerStart(TimerHandle)
For i = 1 To Iteration
strResult = cGetShortMonth(LNG_FRENCH, 1)
Next i
mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
TimerCloseOk = cTimerClose(TimerHandle)
End Sub