home *** CD-ROM | disk | FTP | other *** search
/ Hot Shareware 32 / hot34.iso / ficheros / LVB / T2W32523.ZIP / _DMLANG.FRM < prev    next >
Text File  |  1998-04-07  |  14KB  |  556 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    =   5025
  7.    ClientLeft      =   1890
  8.    ClientTop       =   3255
  9.    ClientWidth     =   9000
  10.    MaxButton       =   0   'False
  11.    MDIChild        =   -1  'True
  12.    PaletteMode     =   1  'UseZOrder
  13.    ScaleHeight     =   5025
  14.    ScaleWidth      =   9000
  15.    ShowInTaskbar   =   0   'False
  16.    Begin VB.TextBox txt_Result 
  17.       BackColor       =   &H00C0C0C0&
  18.       BorderStyle     =   0  'None
  19.       Height          =   4290
  20.       Left            =   180
  21.       Locked          =   -1  'True
  22.       MultiLine       =   -1  'True
  23.       ScrollBars      =   2  'Vertical
  24.       TabIndex        =   6
  25.       Top             =   630
  26.       Width           =   8730
  27.    End
  28.    Begin Threed.SSPanel SSPanel1 
  29.       Align           =   1  'Align Top
  30.       Height          =   480
  31.       Left            =   0
  32.       TabIndex        =   0
  33.       Top             =   0
  34.       Width           =   9000
  35.       _Version        =   65536
  36.       _ExtentX        =   15875
  37.       _ExtentY        =   847
  38.       _StockProps     =   15
  39.       ForeColor       =   -2147483640
  40.       BackColor       =   12632256
  41.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  42.          Name            =   "MS Sans Serif"
  43.          Size            =   8.25
  44.          Charset         =   0
  45.          Weight          =   400
  46.          Underline       =   0   'False
  47.          Italic          =   0   'False
  48.          Strikethrough   =   0   'False
  49.       EndProperty
  50.       Begin VB.ComboBox cmb_Function 
  51.          Height          =   315
  52.          Left            =   1365
  53.          TabIndex        =   1
  54.          Top             =   90
  55.          Width           =   6315
  56.       End
  57.       Begin Threed.SSCommand cmdNP 
  58.          Height          =   300
  59.          Index           =   1
  60.          Left            =   8670
  61.          TabIndex        =   5
  62.          Top             =   90
  63.          Width           =   255
  64.          _Version        =   65536
  65.          _ExtentX        =   450
  66.          _ExtentY        =   529
  67.          _StockProps     =   78
  68.          Caption         =   ">"
  69.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  70.             Name            =   "MS Sans Serif"
  71.             Size            =   8.25
  72.             Charset         =   0
  73.             Weight          =   400
  74.             Underline       =   0   'False
  75.             Italic          =   0   'False
  76.             Strikethrough   =   0   'False
  77.          EndProperty
  78.          BevelWidth      =   1
  79.          Font3D          =   3
  80.          RoundedCorners  =   0   'False
  81.          Outline         =   0   'False
  82.       End
  83.       Begin Threed.SSCommand cmdNP 
  84.          Height          =   300
  85.          Index           =   0
  86.          Left            =   7830
  87.          TabIndex        =   4
  88.          Top             =   90
  89.          Width           =   255
  90.          _Version        =   65536
  91.          _ExtentX        =   450
  92.          _ExtentY        =   529
  93.          _StockProps     =   78
  94.          Caption         =   "<"
  95.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  96.             Name            =   "MS Sans Serif"
  97.             Size            =   8.25
  98.             Charset         =   0
  99.             Weight          =   400
  100.             Underline       =   0   'False
  101.             Italic          =   0   'False
  102.             Strikethrough   =   0   'False
  103.          EndProperty
  104.          BevelWidth      =   1
  105.          Font3D          =   3
  106.          RoundedCorners  =   0   'False
  107.          Outline         =   0   'False
  108.       End
  109.       Begin Threed.SSCommand SSCommand1 
  110.          Default         =   -1  'True
  111.          Height          =   300
  112.          Left            =   8145
  113.          TabIndex        =   2
  114.          Top             =   90
  115.          Width           =   465
  116.          _Version        =   65536
  117.          _ExtentX        =   820
  118.          _ExtentY        =   529
  119.          _StockProps     =   78
  120.          Caption         =   "&Go"
  121.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  122.             Name            =   "MS Sans Serif"
  123.             Size            =   8.25
  124.             Charset         =   0
  125.             Weight          =   400
  126.             Underline       =   0   'False
  127.             Italic          =   0   'False
  128.             Strikethrough   =   0   'False
  129.          EndProperty
  130.          BevelWidth      =   1
  131.          RoundedCorners  =   0   'False
  132.          Outline         =   0   'False
  133.       End
  134.       Begin VB.Label Label2 
  135.          Caption         =   "&Select a function"
  136.          Height          =   255
  137.          Left            =   90
  138.          TabIndex        =   3
  139.          Top             =   120
  140.          Width           =   1275
  141.       End
  142.    End
  143. End
  144. Attribute VB_Name = "frmDayMonth"
  145. Attribute VB_GlobalNameSpace = False
  146. Attribute VB_Creatable = False
  147. Attribute VB_PredeclaredId = True
  148. Attribute VB_Exposed = False
  149. Option Explicit
  150. Option Base 1
  151.  
  152. Private Const Iteration = 250
  153.  
  154. Dim IsLoaded         As Integer
  155.  
  156. Dim TimerStartOk     As Integer
  157. Dim TimerCloseOk     As Integer
  158.  
  159. Dim TimerHandle      As Integer
  160. Dim TimerValue       As Long
  161.  
  162. Dim Language(LNG_FRENCH To LNG_SWEDISH) As String
  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.    txt_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_SWEDISH
  249.       strDisplay = strDisplay + Language(i) + cGetAscTime(i) + vbCrLf + vbCrLf
  250.    Next i
  251.  
  252.    txt_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. Private Sub TestTinyDay()
  270.    
  271.    Dim intResult        As Integer
  272.    Dim strResult        As String
  273.    Dim strDisplay       As String
  274.    
  275.    Dim i                As Integer
  276.    Dim j                As Integer
  277.    
  278.    intResult = 0
  279.    
  280.    strResult = ""
  281.    strDisplay = ""
  282.    
  283.    For i = LNG_FRENCH To LNG_SWEDISH
  284.       strDisplay = strDisplay + Language(i)
  285.       For j = 1 To 7
  286.          strDisplay = strDisplay + cGetTinyDay(i, j) + " "
  287.       Next j
  288.       strDisplay = strDisplay + vbCrLf + vbCrLf
  289.    Next i
  290.    
  291.    txt_Result = strDisplay
  292.  
  293.    'time the function
  294.  
  295.    TimerHandle = cTimerOpen()
  296.    TimerStartOk = cTimerStart(TimerHandle)
  297.    
  298.    For i = 1 To Iteration
  299.       strResult = cGetTinyDay(LNG_FRENCH, 1)
  300.    Next i
  301.    
  302.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  303.    
  304.    TimerCloseOk = cTimerClose(TimerHandle)
  305.  
  306. End Sub
  307.  
  308. Private Sub FillLanguage(arrLanguage() As String)
  309.  
  310.    arrLanguage(LNG_FRENCH) = "French : "
  311.    arrLanguage(LNG_DUTCH) = "Dutch : "
  312.    arrLanguage(LNG_GERMAN) = "German : "
  313.    arrLanguage(LNG_ENGLISH) = "English : "
  314.    arrLanguage(LNG_ITALIAN) = "Italian : "
  315.    arrLanguage(LNG_SPANISH) = "Spanish : "
  316.    arrLanguage(LNG_CATALAN) = "Catalan : "
  317.    arrLanguage(LNG_POLISH) = "Polish : "
  318.    arrLanguage(LNG_NORWAY) = "Norway : "
  319.    arrLanguage(LNG_SWEDISH) = "Swedish : "
  320.  
  321. End Sub
  322.  
  323. Private Sub TestSmallDay()
  324.    
  325.    Dim intResult        As Integer
  326.    Dim strResult        As String
  327.    Dim strDisplay       As String
  328.    
  329.    Dim i                As Integer
  330.    Dim j                As Integer
  331.    
  332.    intResult = 0
  333.    
  334.    strResult = ""
  335.    strDisplay = ""
  336.    
  337.    For i = LNG_FRENCH To LNG_SWEDISH
  338.       strDisplay = strDisplay + Language(i)
  339.       For j = 1 To 7
  340.          strDisplay = strDisplay + cGetSmallDay(i, j) + " "
  341.       Next j
  342.       strDisplay = strDisplay + vbCrLf + vbCrLf
  343.    Next i
  344.    
  345.    txt_Result = strDisplay
  346.  
  347.    'time the function
  348.  
  349.    TimerHandle = cTimerOpen()
  350.    TimerStartOk = cTimerStart(TimerHandle)
  351.    
  352.    For i = 1 To Iteration
  353.       strResult = cGetSmallDay(LNG_FRENCH, 1)
  354.    Next i
  355.    
  356.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  357.    
  358.    TimerCloseOk = cTimerClose(TimerHandle)
  359.  
  360. End Sub
  361.  
  362. Private Sub TestLongDay()
  363.    
  364.    Dim intResult        As Integer
  365.    Dim strResult        As String
  366.    Dim strDisplay       As String
  367.    
  368.    Dim i                As Integer
  369.    Dim j                As Integer
  370.    
  371.    intResult = 0
  372.    
  373.    strResult = ""
  374.    strDisplay = ""
  375.    
  376.    For i = LNG_FRENCH To LNG_SWEDISH
  377.       strDisplay = strDisplay + Language(i)
  378.       For j = 1 To 7
  379.          strDisplay = strDisplay + cGetLongDay(i, j) + " "
  380.       Next j
  381.       strDisplay = strDisplay + vbCrLf + vbCrLf
  382.    Next i
  383.    
  384.    txt_Result = strDisplay
  385.  
  386.    'time the function
  387.  
  388.    TimerHandle = cTimerOpen()
  389.    TimerStartOk = cTimerStart(TimerHandle)
  390.    
  391.    For i = 1 To Iteration
  392.       strResult = cGetLongDay(LNG_FRENCH, 1)
  393.    Next i
  394.    
  395.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  396.    
  397.    TimerCloseOk = cTimerClose(TimerHandle)
  398.  
  399. End Sub
  400.  
  401. Private Sub TestShortDay()
  402.    
  403.    Dim intResult        As Integer
  404.    Dim strResult        As String
  405.    Dim strDisplay       As String
  406.    
  407.    Dim i                As Integer
  408.    Dim j                As Integer
  409.    
  410.    intResult = 0
  411.    
  412.    strResult = ""
  413.    strDisplay = ""
  414.    
  415.    For i = LNG_FRENCH To LNG_SWEDISH
  416.       strDisplay = strDisplay + Language(i)
  417.       For j = 1 To 7
  418.          strDisplay = strDisplay + cGetShortDay(i, j) + " "
  419.       Next j
  420.       strDisplay = strDisplay + vbCrLf + vbCrLf
  421.    Next i
  422.    
  423.    txt_Result = strDisplay
  424.  
  425.    'time the function
  426.  
  427.    TimerHandle = cTimerOpen()
  428.    TimerStartOk = cTimerStart(TimerHandle)
  429.    
  430.    For i = 1 To Iteration
  431.       strResult = cGetShortDay(LNG_FRENCH, 1)
  432.    Next i
  433.    
  434.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  435.    
  436.    TimerCloseOk = cTimerClose(TimerHandle)
  437.  
  438. End Sub
  439.  
  440. Private Sub TestTinyMonth()
  441.    
  442.    Dim intResult        As Integer
  443.    Dim strResult        As String
  444.    Dim strDisplay       As String
  445.    
  446.    Dim i                As Integer
  447.    Dim j                As Integer
  448.    
  449.    intResult = 0
  450.    
  451.    strResult = ""
  452.    strDisplay = ""
  453.    
  454.    For i = LNG_FRENCH To LNG_SWEDISH
  455.       strDisplay = strDisplay + Language(i)
  456.       For j = 1 To 12
  457.          strDisplay = strDisplay + cGetTinyMonth(i, j) + " "
  458.       Next j
  459.       strDisplay = strDisplay + vbCrLf + vbCrLf
  460.    Next i
  461.    
  462.    txt_Result = strDisplay
  463.  
  464.    'time the function
  465.  
  466.    TimerHandle = cTimerOpen()
  467.    TimerStartOk = cTimerStart(TimerHandle)
  468.    
  469.    For i = 1 To Iteration
  470.       strResult = cGetTinyMonth(LNG_FRENCH, 1)
  471.    Next i
  472.    
  473.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  474.    
  475.    TimerCloseOk = cTimerClose(TimerHandle)
  476.  
  477. End Sub
  478.  
  479. Public Sub TestLongMonth()
  480.    
  481.    Dim intResult        As Integer
  482.    Dim strResult        As String
  483.    Dim strDisplay       As String
  484.    
  485.    Dim i                As Integer
  486.    Dim j                As Integer
  487.    
  488.    intResult = 0
  489.    
  490.    strResult = ""
  491.    strDisplay = ""
  492.    
  493.    For i = LNG_FRENCH To LNG_SWEDISH
  494.       strDisplay = strDisplay + Language(i)
  495.       For j = 1 To 12
  496.          strDisplay = strDisplay + cGetLongMonth(i, j) + " "
  497.       Next j
  498.       strDisplay = strDisplay + vbCrLf + vbCrLf
  499.    Next i
  500.    
  501.    txt_Result = strDisplay
  502.  
  503.    'time the function
  504.  
  505.    TimerHandle = cTimerOpen()
  506.    TimerStartOk = cTimerStart(TimerHandle)
  507.    
  508.    For i = 1 To Iteration
  509.       strResult = cGetLongMonth(LNG_FRENCH, 1)
  510.    Next i
  511.    
  512.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  513.    
  514.    TimerCloseOk = cTimerClose(TimerHandle)
  515.  
  516. End Sub
  517.  
  518. Private Sub TestShortMonth()
  519.    
  520.    Dim intResult        As Integer
  521.    Dim strResult        As String
  522.    Dim strDisplay       As String
  523.    
  524.    Dim i                As Integer
  525.    Dim j                As Integer
  526.    
  527.    intResult = 0
  528.    
  529.    strResult = ""
  530.    strDisplay = ""
  531.    
  532.    For i = LNG_FRENCH To LNG_SWEDISH
  533.       strDisplay = strDisplay + Language(i)
  534.       For j = 1 To 12
  535.          strDisplay = strDisplay + cGetShortMonth(i, j) + " "
  536.       Next j
  537.       strDisplay = strDisplay + vbCrLf + vbCrLf
  538.    Next i
  539.    
  540.    txt_Result = strDisplay
  541.  
  542.    'time the function
  543.  
  544.    TimerHandle = cTimerOpen()
  545.    TimerStartOk = cTimerStart(TimerHandle)
  546.    
  547.    For i = 1 To Iteration
  548.       strResult = cGetShortMonth(LNG_FRENCH, 1)
  549.    Next i
  550.    
  551.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  552.    
  553.    TimerCloseOk = cTimerClose(TimerHandle)
  554.  
  555. End Sub
  556.