home *** CD-ROM | disk | FTP | other *** search
/ Hot Shareware 35 / hot35.iso / ficheros / LVB / T2W32543.ZIP / _DMLANG.FRM < prev    next >
Text File  |  1998-05-21  |  11KB  |  489 lines

  1. VERSION 5.00
  2. Begin VB.Form frmDayMonth 
  3.    BorderStyle     =   4  'Fixed ToolWindow
  4.    Caption         =   "Days and months in different language"
  5.    ClientHeight    =   5025
  6.    ClientLeft      =   1890
  7.    ClientTop       =   3255
  8.    ClientWidth     =   9000
  9.    MaxButton       =   0   'False
  10.    MDIChild        =   -1  'True
  11.    PaletteMode     =   1  'UseZOrder
  12.    ScaleHeight     =   5025
  13.    ScaleWidth      =   9000
  14.    ShowInTaskbar   =   0   'False
  15.    Begin VB.Frame Frame1 
  16.       Height          =   570
  17.       Left            =   0
  18.       TabIndex        =   1
  19.       Top             =   -90
  20.       Width           =   9000
  21.       Begin VB.CommandButton cmdNP 
  22.          Caption         =   ">"
  23.          Height          =   285
  24.          Index           =   1
  25.          Left            =   8640
  26.          TabIndex        =   6
  27.          Top             =   195
  28.          Width           =   285
  29.       End
  30.       Begin VB.CommandButton cmdNP 
  31.          Caption         =   "<"
  32.          Height          =   285
  33.          Index           =   0
  34.          Left            =   7740
  35.          TabIndex        =   5
  36.          Top             =   195
  37.          Width           =   285
  38.       End
  39.       Begin VB.CommandButton Command1 
  40.          Caption         =   "&Go"
  41.          Default         =   -1  'True
  42.          Height          =   285
  43.          Left            =   8100
  44.          TabIndex        =   4
  45.          Top             =   195
  46.          Width           =   465
  47.       End
  48.       Begin VB.ComboBox cmb_Function 
  49.          Height          =   315
  50.          Left            =   1365
  51.          TabIndex        =   2
  52.          Top             =   180
  53.          Width           =   6285
  54.       End
  55.       Begin VB.Label Label2 
  56.          Caption         =   "&Select a function"
  57.          Height          =   255
  58.          Left            =   90
  59.          TabIndex        =   3
  60.          Top             =   210
  61.          Width           =   1275
  62.       End
  63.    End
  64.    Begin VB.TextBox txt_Result 
  65.       BackColor       =   &H00C0C0C0&
  66.       BorderStyle     =   0  'None
  67.       Height          =   4290
  68.       Left            =   180
  69.       Locked          =   -1  'True
  70.       MultiLine       =   -1  'True
  71.       ScrollBars      =   2  'Vertical
  72.       TabIndex        =   0
  73.       Top             =   630
  74.       Width           =   8730
  75.    End
  76. End
  77. Attribute VB_Name = "frmDayMonth"
  78. Attribute VB_GlobalNameSpace = False
  79. Attribute VB_Creatable = False
  80. Attribute VB_PredeclaredId = True
  81. Attribute VB_Exposed = False
  82. Option Explicit
  83. Option Base 1
  84.  
  85. Private Const Iteration = 250
  86.  
  87. Dim IsLoaded         As Integer
  88.  
  89. Dim TimerStartOk     As Integer
  90. Dim TimerCloseOk     As Integer
  91.  
  92. Dim TimerHandle      As Integer
  93. Dim TimerValue       As Long
  94.  
  95. Dim Language(LNG_FRENCH To LNG_SWEDISH) As String
  96.       
  97. Private Sub cmdNP_Click(Index As Integer)
  98.  
  99.    Call sub_NextPrev(cmb_Function, Index)
  100.  
  101. End Sub
  102.  
  103.  
  104. Private Sub cmb_Function_Click()
  105.    
  106.    If (IsLoaded = False) Then Exit Sub
  107.    
  108.    Call cDisableFI(mdiT2W.Picture1)
  109.    
  110.    txt_Result = ""
  111.    
  112.    DoEvents
  113.    
  114.    Select Case cmb_Function.ListIndex
  115.       Case 0
  116.          Call TestAscTime
  117.       Case 1
  118.          Call TestTinyDay
  119.       Case 2
  120.          Call TestSmallDay
  121.       Case 3
  122.          Call TestShortDay
  123.       Case 4
  124.          Call TestLongDay
  125.       Case 5
  126.          Call TestTinyMonth
  127.       Case 6
  128.          Call TestShortMonth
  129.       Case 7
  130.          Call TestLongMonth
  131.    End Select
  132.  
  133.    DoEvents
  134.    Call cEnableFI(mdiT2W.Picture1)
  135.    
  136. End Sub
  137.  
  138.  
  139. Private Sub Form_Activate()
  140.  
  141.    mdiT2W.Label2.Caption = cInsertBlocks(mdiT2W.Label2.Tag, "" & Iteration)
  142.  
  143. End Sub
  144.  
  145. Private Sub Form_Load()
  146.  
  147.    IsLoaded = False
  148.    
  149.    Show
  150.  
  151.    Call FillLanguage(Language())
  152.    
  153.    Call sub_Load_Combo(cmb_Function, T2WDirInst + "_dmlang.t2w")
  154.    
  155.    IsLoaded = True
  156.    
  157. End Sub
  158.  
  159. Private Sub Command1_Click()
  160.    
  161.    Call cmb_Function_Click
  162.    
  163. End Sub
  164.  
  165.  
  166.  
  167.  
  168. Private Sub TestAscTime()
  169.    
  170.    Dim intResult        As Integer
  171.    Dim strResult        As String
  172.    Dim strDisplay       As String
  173.    
  174.    Dim i                As Integer
  175.    
  176.    intResult = 0
  177.    
  178.    strResult = ""
  179.    strDisplay = ""
  180.       
  181.    For i = LNG_FRENCH To LNG_SWEDISH
  182.       strDisplay = strDisplay + Language(i) + cGetAscTime(i) + vbCrLf + vbCrLf
  183.    Next i
  184.  
  185.    txt_Result = strDisplay
  186.  
  187.    'time the function
  188.  
  189.    TimerHandle = cTimerOpen()
  190.    TimerStartOk = cTimerStart(TimerHandle)
  191.    
  192.    For i = 1 To Iteration
  193.       strResult = cGetAscTime(LNG_FRENCH)
  194.    Next i
  195.    
  196.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  197.    
  198.    TimerCloseOk = cTimerClose(TimerHandle)
  199.  
  200. End Sub
  201.  
  202. Private Sub TestTinyDay()
  203.    
  204.    Dim intResult        As Integer
  205.    Dim strResult        As String
  206.    Dim strDisplay       As String
  207.    
  208.    Dim i                As Integer
  209.    Dim j                As Integer
  210.    
  211.    intResult = 0
  212.    
  213.    strResult = ""
  214.    strDisplay = ""
  215.    
  216.    For i = LNG_FRENCH To LNG_SWEDISH
  217.       strDisplay = strDisplay + Language(i)
  218.       For j = 1 To 7
  219.          strDisplay = strDisplay + cGetTinyDay(i, j) + " "
  220.       Next j
  221.       strDisplay = strDisplay + vbCrLf + vbCrLf
  222.    Next i
  223.    
  224.    txt_Result = strDisplay
  225.  
  226.    'time the function
  227.  
  228.    TimerHandle = cTimerOpen()
  229.    TimerStartOk = cTimerStart(TimerHandle)
  230.    
  231.    For i = 1 To Iteration
  232.       strResult = cGetTinyDay(LNG_FRENCH, 1)
  233.    Next i
  234.    
  235.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  236.    
  237.    TimerCloseOk = cTimerClose(TimerHandle)
  238.  
  239. End Sub
  240.  
  241. Private Sub FillLanguage(arrLanguage() As String)
  242.  
  243.    arrLanguage(LNG_FRENCH) = "French : "
  244.    arrLanguage(LNG_DUTCH) = "Dutch : "
  245.    arrLanguage(LNG_GERMAN) = "German : "
  246.    arrLanguage(LNG_ENGLISH) = "English : "
  247.    arrLanguage(LNG_ITALIAN) = "Italian : "
  248.    arrLanguage(LNG_SPANISH) = "Spanish : "
  249.    arrLanguage(LNG_CATALAN) = "Catalan : "
  250.    arrLanguage(LNG_POLISH) = "Polish : "
  251.    arrLanguage(LNG_NORWAY) = "Norway : "
  252.    arrLanguage(LNG_SWEDISH) = "Swedish : "
  253.  
  254. End Sub
  255.  
  256. Private Sub TestSmallDay()
  257.    
  258.    Dim intResult        As Integer
  259.    Dim strResult        As String
  260.    Dim strDisplay       As String
  261.    
  262.    Dim i                As Integer
  263.    Dim j                As Integer
  264.    
  265.    intResult = 0
  266.    
  267.    strResult = ""
  268.    strDisplay = ""
  269.    
  270.    For i = LNG_FRENCH To LNG_SWEDISH
  271.       strDisplay = strDisplay + Language(i)
  272.       For j = 1 To 7
  273.          strDisplay = strDisplay + cGetSmallDay(i, j) + " "
  274.       Next j
  275.       strDisplay = strDisplay + vbCrLf + vbCrLf
  276.    Next i
  277.    
  278.    txt_Result = strDisplay
  279.  
  280.    'time the function
  281.  
  282.    TimerHandle = cTimerOpen()
  283.    TimerStartOk = cTimerStart(TimerHandle)
  284.    
  285.    For i = 1 To Iteration
  286.       strResult = cGetSmallDay(LNG_FRENCH, 1)
  287.    Next i
  288.    
  289.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  290.    
  291.    TimerCloseOk = cTimerClose(TimerHandle)
  292.  
  293. End Sub
  294.  
  295. Private Sub TestLongDay()
  296.    
  297.    Dim intResult        As Integer
  298.    Dim strResult        As String
  299.    Dim strDisplay       As String
  300.    
  301.    Dim i                As Integer
  302.    Dim j                As Integer
  303.    
  304.    intResult = 0
  305.    
  306.    strResult = ""
  307.    strDisplay = ""
  308.    
  309.    For i = LNG_FRENCH To LNG_SWEDISH
  310.       strDisplay = strDisplay + Language(i)
  311.       For j = 1 To 7
  312.          strDisplay = strDisplay + cGetLongDay(i, j) + " "
  313.       Next j
  314.       strDisplay = strDisplay + vbCrLf + vbCrLf
  315.    Next i
  316.    
  317.    txt_Result = strDisplay
  318.  
  319.    'time the function
  320.  
  321.    TimerHandle = cTimerOpen()
  322.    TimerStartOk = cTimerStart(TimerHandle)
  323.    
  324.    For i = 1 To Iteration
  325.       strResult = cGetLongDay(LNG_FRENCH, 1)
  326.    Next i
  327.    
  328.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  329.    
  330.    TimerCloseOk = cTimerClose(TimerHandle)
  331.  
  332. End Sub
  333.  
  334. Private Sub TestShortDay()
  335.    
  336.    Dim intResult        As Integer
  337.    Dim strResult        As String
  338.    Dim strDisplay       As String
  339.    
  340.    Dim i                As Integer
  341.    Dim j                As Integer
  342.    
  343.    intResult = 0
  344.    
  345.    strResult = ""
  346.    strDisplay = ""
  347.    
  348.    For i = LNG_FRENCH To LNG_SWEDISH
  349.       strDisplay = strDisplay + Language(i)
  350.       For j = 1 To 7
  351.          strDisplay = strDisplay + cGetShortDay(i, j) + " "
  352.       Next j
  353.       strDisplay = strDisplay + vbCrLf + vbCrLf
  354.    Next i
  355.    
  356.    txt_Result = strDisplay
  357.  
  358.    'time the function
  359.  
  360.    TimerHandle = cTimerOpen()
  361.    TimerStartOk = cTimerStart(TimerHandle)
  362.    
  363.    For i = 1 To Iteration
  364.       strResult = cGetShortDay(LNG_FRENCH, 1)
  365.    Next i
  366.    
  367.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  368.    
  369.    TimerCloseOk = cTimerClose(TimerHandle)
  370.  
  371. End Sub
  372.  
  373. Private Sub TestTinyMonth()
  374.    
  375.    Dim intResult        As Integer
  376.    Dim strResult        As String
  377.    Dim strDisplay       As String
  378.    
  379.    Dim i                As Integer
  380.    Dim j                As Integer
  381.    
  382.    intResult = 0
  383.    
  384.    strResult = ""
  385.    strDisplay = ""
  386.    
  387.    For i = LNG_FRENCH To LNG_SWEDISH
  388.       strDisplay = strDisplay + Language(i)
  389.       For j = 1 To 12
  390.          strDisplay = strDisplay + cGetTinyMonth(i, j) + " "
  391.       Next j
  392.       strDisplay = strDisplay + vbCrLf + vbCrLf
  393.    Next i
  394.    
  395.    txt_Result = strDisplay
  396.  
  397.    'time the function
  398.  
  399.    TimerHandle = cTimerOpen()
  400.    TimerStartOk = cTimerStart(TimerHandle)
  401.    
  402.    For i = 1 To Iteration
  403.       strResult = cGetTinyMonth(LNG_FRENCH, 1)
  404.    Next i
  405.    
  406.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  407.    
  408.    TimerCloseOk = cTimerClose(TimerHandle)
  409.  
  410. End Sub
  411.  
  412. Public Sub TestLongMonth()
  413.    
  414.    Dim intResult        As Integer
  415.    Dim strResult        As String
  416.    Dim strDisplay       As String
  417.    
  418.    Dim i                As Integer
  419.    Dim j                As Integer
  420.    
  421.    intResult = 0
  422.    
  423.    strResult = ""
  424.    strDisplay = ""
  425.    
  426.    For i = LNG_FRENCH To LNG_SWEDISH
  427.       strDisplay = strDisplay + Language(i)
  428.       For j = 1 To 12
  429.          strDisplay = strDisplay + cGetLongMonth(i, j) + " "
  430.       Next j
  431.       strDisplay = strDisplay + vbCrLf + vbCrLf
  432.    Next i
  433.    
  434.    txt_Result = strDisplay
  435.  
  436.    'time the function
  437.  
  438.    TimerHandle = cTimerOpen()
  439.    TimerStartOk = cTimerStart(TimerHandle)
  440.    
  441.    For i = 1 To Iteration
  442.       strResult = cGetLongMonth(LNG_FRENCH, 1)
  443.    Next i
  444.    
  445.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  446.    
  447.    TimerCloseOk = cTimerClose(TimerHandle)
  448.  
  449. End Sub
  450.  
  451. Private Sub TestShortMonth()
  452.    
  453.    Dim intResult        As Integer
  454.    Dim strResult        As String
  455.    Dim strDisplay       As String
  456.    
  457.    Dim i                As Integer
  458.    Dim j                As Integer
  459.    
  460.    intResult = 0
  461.    
  462.    strResult = ""
  463.    strDisplay = ""
  464.    
  465.    For i = LNG_FRENCH To LNG_SWEDISH
  466.       strDisplay = strDisplay + Language(i)
  467.       For j = 1 To 12
  468.          strDisplay = strDisplay + cGetShortMonth(i, j) + " "
  469.       Next j
  470.       strDisplay = strDisplay + vbCrLf + vbCrLf
  471.    Next i
  472.    
  473.    txt_Result = strDisplay
  474.  
  475.    'time the function
  476.  
  477.    TimerHandle = cTimerOpen()
  478.    TimerStartOk = cTimerStart(TimerHandle)
  479.    
  480.    For i = 1 To Iteration
  481.       strResult = cGetShortMonth(LNG_FRENCH, 1)
  482.    Next i
  483.    
  484.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  485.    
  486.    TimerCloseOk = cTimerClose(TimerHandle)
  487.  
  488. End Sub
  489.