home *** CD-ROM | disk | FTP | other *** search
/ BUG 11 / BUGCD1998_02.ISO / util / time2win / t2w32500.exe / _DMLANG.FRM < prev    next >
Text File  |  1997-12-25  |  14KB  |  567 lines

  1. VERSION 5.00
  2. Object = "{0BA686C6-F7D3-101A-993E-0000C0EF6F5E}#1.0#0"; "THREED32.OCX"
  3. Begin VB.Form frmDayMonth 
  4.    BorderStyle     =   4  'Fixed ToolWindow
  5.    Caption         =   "Days and months in different language"
  6.    ClientHeight    =   4065
  7.    ClientLeft      =   1890
  8.    ClientTop       =   3255
  9.    ClientWidth     =   8130
  10.    MaxButton       =   0   'False
  11.    MDIChild        =   -1  'True
  12.    PaletteMode     =   1  'UseZOrder
  13.    ScaleHeight     =   4065
  14.    ScaleWidth      =   8130
  15.    ShowInTaskbar   =   0   'False
  16.    Begin Threed.SSPanel SSPanel1 
  17.       Align           =   1  'Align Top
  18.       Height          =   480
  19.       Left            =   0
  20.       TabIndex        =   1
  21.       Top             =   0
  22.       Width           =   8130
  23.       _Version        =   65536
  24.       _ExtentX        =   14340
  25.       _ExtentY        =   847
  26.       _StockProps     =   15
  27.       ForeColor       =   -2147483640
  28.       BackColor       =   12632256
  29.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  30.          Name            =   "MS Sans Serif"
  31.          Size            =   8.25
  32.          Charset         =   0
  33.          Weight          =   400
  34.          Underline       =   0   'False
  35.          Italic          =   0   'False
  36.          Strikethrough   =   0   'False
  37.       EndProperty
  38.       Begin VB.ComboBox cmb_Function 
  39.          Height          =   315
  40.          Left            =   1365
  41.          TabIndex        =   2
  42.          Top             =   90
  43.          Width           =   5415
  44.       End
  45.       Begin Threed.SSCommand cmdNP 
  46.          Height          =   300
  47.          Index           =   1
  48.          Left            =   7770
  49.          TabIndex        =   6
  50.          Top             =   90
  51.          Width           =   255
  52.          _Version        =   65536
  53.          _ExtentX        =   450
  54.          _ExtentY        =   529
  55.          _StockProps     =   78
  56.          Caption         =   ">"
  57.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  58.             Name            =   "MS Sans Serif"
  59.             Size            =   8.25
  60.             Charset         =   0
  61.             Weight          =   400
  62.             Underline       =   0   'False
  63.             Italic          =   0   'False
  64.             Strikethrough   =   0   'False
  65.          EndProperty
  66.          BevelWidth      =   1
  67.          Font3D          =   3
  68.          RoundedCorners  =   0   'False
  69.          Outline         =   0   'False
  70.       End
  71.       Begin Threed.SSCommand cmdNP 
  72.          Height          =   300
  73.          Index           =   0
  74.          Left            =   6930
  75.          TabIndex        =   5
  76.          Top             =   90
  77.          Width           =   255
  78.          _Version        =   65536
  79.          _ExtentX        =   450
  80.          _ExtentY        =   529
  81.          _StockProps     =   78
  82.          Caption         =   "<"
  83.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  84.             Name            =   "MS Sans Serif"
  85.             Size            =   8.25
  86.             Charset         =   0
  87.             Weight          =   400
  88.             Underline       =   0   'False
  89.             Italic          =   0   'False
  90.             Strikethrough   =   0   'False
  91.          EndProperty
  92.          BevelWidth      =   1
  93.          Font3D          =   3
  94.          RoundedCorners  =   0   'False
  95.          Outline         =   0   'False
  96.       End
  97.       Begin Threed.SSCommand SSCommand1 
  98.          Default         =   -1  'True
  99.          Height          =   300
  100.          Left            =   7245
  101.          TabIndex        =   3
  102.          Top             =   90
  103.          Width           =   465
  104.          _Version        =   65536
  105.          _ExtentX        =   820
  106.          _ExtentY        =   529
  107.          _StockProps     =   78
  108.          Caption         =   "&Go"
  109.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  110.             Name            =   "MS Sans Serif"
  111.             Size            =   8.25
  112.             Charset         =   0
  113.             Weight          =   400
  114.             Underline       =   0   'False
  115.             Italic          =   0   'False
  116.             Strikethrough   =   0   'False
  117.          EndProperty
  118.          BevelWidth      =   1
  119.          RoundedCorners  =   0   'False
  120.          Outline         =   0   'False
  121.       End
  122.       Begin VB.Label Label2 
  123.          Caption         =   "&Select a function"
  124.          Height          =   255
  125.          Left            =   90
  126.          TabIndex        =   4
  127.          Top             =   120
  128.          Width           =   1275
  129.       End
  130.    End
  131.    Begin VB.Label lbl_Result 
  132.       Appearance      =   0  'Flat
  133.       BackColor       =   &H80000005&
  134.       BackStyle       =   0  'Transparent
  135.       ForeColor       =   &H80000008&
  136.       Height          =   3345
  137.       Left            =   90
  138.       TabIndex        =   0
  139.       Top             =   630
  140.       Width           =   7935
  141.    End
  142. End
  143. Attribute VB_Name = "frmDayMonth"
  144. Attribute VB_GlobalNameSpace = False
  145. Attribute VB_Creatable = False
  146. Attribute VB_PredeclaredId = True
  147. Attribute VB_Exposed = False
  148. Option Explicit
  149. Option Base 1
  150.  
  151. Private Const Iteration = 250
  152.  
  153. Dim IsLoaded         As Integer
  154.  
  155. Dim TimerStartOk     As Integer
  156. Dim TimerCloseOk     As Integer
  157.  
  158. Dim TimerHandle      As Integer
  159. Dim TimerValue       As Long
  160.  
  161. Dim Language(LNG_FRENCH To LNG_NORWAY) As String
  162.       
  163.  
  164. Private Sub cmdNP_Click(Index As Integer)
  165.  
  166.    Call sub_NextPrev(cmb_Function, Index)
  167.  
  168. End Sub
  169.  
  170.  
  171. Private Sub cmb_Function_Click()
  172.    
  173.    If (IsLoaded = False) Then Exit Sub
  174.    
  175.    Call cDisableFI(mdiT2W.Picture1)
  176.    
  177.    lbl_Result = ""
  178.    
  179.    DoEvents
  180.    
  181.    Select Case cmb_Function.ListIndex
  182.       Case 0
  183.          Call TestAscTime
  184.       Case 1
  185.          Call TestTinyDay
  186.       Case 2
  187.          Call TestSmallDay
  188.       Case 3
  189.          Call TestShortDay
  190.       Case 4
  191.          Call TestLongDay
  192.       Case 5
  193.          Call TestTinyMonth
  194.       Case 6
  195.          Call TestShortMonth
  196.       Case 7
  197.          Call TestLongMonth
  198.    End Select
  199.  
  200.    DoEvents
  201.    Call cEnableFI(mdiT2W.Picture1)
  202.    
  203. End Sub
  204.  
  205.  
  206. Private Sub Form_Activate()
  207.  
  208.    mdiT2W.Label2.Caption = cInsertBlocks(mdiT2W.Label2.Tag, "" & Iteration)
  209.  
  210. End Sub
  211.  
  212. Private Sub Form_Load()
  213.  
  214.    IsLoaded = False
  215.    
  216.    Show
  217.  
  218.    Call FillLanguage(Language())
  219.    
  220.    Call sub_Load_Combo(cmb_Function, T2WDirInst + "_dmlang.t2w")
  221.    
  222.    IsLoaded = True
  223.    
  224. End Sub
  225.  
  226. Private Sub SSCommand1_Click()
  227.    
  228.    Call cmb_Function_Click
  229.    
  230. End Sub
  231.  
  232.  
  233.  
  234.  
  235. Private Sub TestAscTime()
  236.    
  237.    Dim intResult        As Integer
  238.    Dim strResult        As String
  239.    Dim strDisplay       As String
  240.    
  241.    Dim i                As Integer
  242.    
  243.    intResult = 0
  244.    
  245.    strResult = ""
  246.    strDisplay = ""
  247.       
  248.    For i = LNG_FRENCH To LNG_NORWAY
  249.       strDisplay = strDisplay + Language(i) + cGetAscTime(i) + vbCrLf + vbCrLf
  250.    Next i
  251.  
  252.    lbl_Result = strDisplay
  253.  
  254.    'time the function
  255.  
  256.    TimerHandle = cTimerOpen()
  257.    TimerStartOk = cTimerStart(TimerHandle)
  258.    
  259.    For i = 1 To Iteration
  260.       strResult = cGetAscTime(LNG_FRENCH)
  261.    Next i
  262.    
  263.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  264.    
  265.    TimerCloseOk = cTimerClose(TimerHandle)
  266.  
  267. End Sub
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281. Private Sub TestTinyDay()
  282.    
  283.    Dim intResult        As Integer
  284.    Dim strResult        As String
  285.    Dim strDisplay       As String
  286.    
  287.    Dim i                As Integer
  288.    Dim j                As Integer
  289.    
  290.    intResult = 0
  291.    
  292.    strResult = ""
  293.    strDisplay = ""
  294.    
  295.    For i = LNG_FRENCH To LNG_NORWAY
  296.       strDisplay = strDisplay + Language(i)
  297.       For j = 1 To 7
  298.          strDisplay = strDisplay + cGetTinyDay(i, j) + " "
  299.       Next j
  300.       strDisplay = strDisplay + vbCrLf + vbCrLf
  301.    Next i
  302.    
  303.    lbl_Result = strDisplay
  304.  
  305.    'time the function
  306.  
  307.    TimerHandle = cTimerOpen()
  308.    TimerStartOk = cTimerStart(TimerHandle)
  309.    
  310.    For i = 1 To Iteration
  311.       strResult = cGetTinyDay(LNG_FRENCH, 1)
  312.    Next i
  313.    
  314.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  315.    
  316.    TimerCloseOk = cTimerClose(TimerHandle)
  317.  
  318. End Sub
  319.  
  320. Private Sub FillLanguage(arrLanguage() As String)
  321.  
  322.    arrLanguage(LNG_FRENCH) = "French : "
  323.    arrLanguage(LNG_DUTCH) = "Dutch : "
  324.    arrLanguage(LNG_GERMAN) = "German : "
  325.    arrLanguage(LNG_ENGLISH) = "English : "
  326.    arrLanguage(LNG_ITALIAN) = "Italian : "
  327.    arrLanguage(LNG_SPANISH) = "Spanish : "
  328.    arrLanguage(LNG_CATALAN) = "Catalan : "
  329.    arrLanguage(LNG_POLISH) = "Polish : "
  330.    arrLanguage(LNG_NORWAY) = "Norway : "
  331.  
  332. End Sub
  333.  
  334. Private Sub TestSmallDay()
  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_NORWAY
  349.       strDisplay = strDisplay + Language(i)
  350.       For j = 1 To 7
  351.          strDisplay = strDisplay + cGetSmallDay(i, j) + " "
  352.       Next j
  353.       strDisplay = strDisplay + vbCrLf + vbCrLf
  354.    Next i
  355.    
  356.    lbl_Result = strDisplay
  357.  
  358.    'time the function
  359.  
  360.    TimerHandle = cTimerOpen()
  361.    TimerStartOk = cTimerStart(TimerHandle)
  362.    
  363.    For i = 1 To Iteration
  364.       strResult = cGetSmallDay(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 TestLongDay()
  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_NORWAY
  388.       strDisplay = strDisplay + Language(i)
  389.       For j = 1 To 7
  390.          strDisplay = strDisplay + cGetLongDay(i, j) + " "
  391.       Next j
  392.       strDisplay = strDisplay + vbCrLf + vbCrLf
  393.    Next i
  394.    
  395.    lbl_Result = strDisplay
  396.  
  397.    'time the function
  398.  
  399.    TimerHandle = cTimerOpen()
  400.    TimerStartOk = cTimerStart(TimerHandle)
  401.    
  402.    For i = 1 To Iteration
  403.       strResult = cGetLongDay(LNG_FRENCH, 1)
  404.    Next i
  405.    
  406.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  407.    
  408.    TimerCloseOk = cTimerClose(TimerHandle)
  409.  
  410. End Sub
  411.  
  412. Private Sub TestShortDay()
  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_NORWAY
  427.       strDisplay = strDisplay + Language(i)
  428.       For j = 1 To 7
  429.          strDisplay = strDisplay + cGetShortDay(i, j) + " "
  430.       Next j
  431.       strDisplay = strDisplay + vbCrLf + vbCrLf
  432.    Next i
  433.    
  434.    lbl_Result = strDisplay
  435.  
  436.    'time the function
  437.  
  438.    TimerHandle = cTimerOpen()
  439.    TimerStartOk = cTimerStart(TimerHandle)
  440.    
  441.    For i = 1 To Iteration
  442.       strResult = cGetShortDay(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 TestTinyMonth()
  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_NORWAY
  466.       strDisplay = strDisplay + Language(i)
  467.       For j = 1 To 12
  468.          strDisplay = strDisplay + cGetTinyMonth(i, j) + " "
  469.       Next j
  470.       strDisplay = strDisplay + vbCrLf + vbCrLf
  471.    Next i
  472.    
  473.    lbl_Result = strDisplay
  474.  
  475.    'time the function
  476.  
  477.    TimerHandle = cTimerOpen()
  478.    TimerStartOk = cTimerStart(TimerHandle)
  479.    
  480.    For i = 1 To Iteration
  481.       strResult = cGetTinyMonth(LNG_FRENCH, 1)
  482.    Next i
  483.    
  484.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  485.    
  486.    TimerCloseOk = cTimerClose(TimerHandle)
  487.  
  488. End Sub
  489.  
  490. Public Sub TestLongMonth()
  491.    
  492.    Dim intResult        As Integer
  493.    Dim strResult        As String
  494.    Dim strDisplay       As String
  495.    
  496.    Dim i                As Integer
  497.    Dim j                As Integer
  498.    
  499.    intResult = 0
  500.    
  501.    strResult = ""
  502.    strDisplay = ""
  503.    
  504.    For i = LNG_FRENCH To LNG_NORWAY
  505.       strDisplay = strDisplay + Language(i)
  506.       For j = 1 To 12
  507.          strDisplay = strDisplay + cGetLongMonth(i, j) + " "
  508.       Next j
  509.       strDisplay = strDisplay + vbCrLf + vbCrLf
  510.    Next i
  511.    
  512.    lbl_Result = strDisplay
  513.  
  514.    'time the function
  515.  
  516.    TimerHandle = cTimerOpen()
  517.    TimerStartOk = cTimerStart(TimerHandle)
  518.    
  519.    For i = 1 To Iteration
  520.       strResult = cGetLongMonth(LNG_FRENCH, 1)
  521.    Next i
  522.    
  523.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  524.    
  525.    TimerCloseOk = cTimerClose(TimerHandle)
  526.  
  527. End Sub
  528.  
  529. Private Sub TestShortMonth()
  530.    
  531.    Dim intResult        As Integer
  532.    Dim strResult        As String
  533.    Dim strDisplay       As String
  534.    
  535.    Dim i                As Integer
  536.    Dim j                As Integer
  537.    
  538.    intResult = 0
  539.    
  540.    strResult = ""
  541.    strDisplay = ""
  542.    
  543.    For i = LNG_FRENCH To LNG_NORWAY
  544.       strDisplay = strDisplay + Language(i)
  545.       For j = 1 To 12
  546.          strDisplay = strDisplay + cGetShortMonth(i, j) + " "
  547.       Next j
  548.       strDisplay = strDisplay + vbCrLf + vbCrLf
  549.    Next i
  550.    
  551.    lbl_Result = strDisplay
  552.  
  553.    'time the function
  554.  
  555.    TimerHandle = cTimerOpen()
  556.    TimerStartOk = cTimerStart(TimerHandle)
  557.    
  558.    For i = 1 To Iteration
  559.       strResult = cGetShortMonth(LNG_FRENCH, 1)
  560.    Next i
  561.    
  562.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  563.    
  564.    TimerCloseOk = cTimerClose(TimerHandle)
  565.  
  566. End Sub
  567.