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

  1. VERSION 5.00
  2. Begin VB.Form frmRas 
  3.    BorderStyle     =   4  'Fixed ToolWindow
  4.    Caption         =   "Remote Access Service"
  5.    ClientHeight    =   4845
  6.    ClientLeft      =   1890
  7.    ClientTop       =   3270
  8.    ClientWidth     =   7485
  9.    MaxButton       =   0   'False
  10.    MDIChild        =   -1  'True
  11.    PaletteMode     =   1  'UseZOrder
  12.    ScaleHeight     =   4845
  13.    ScaleWidth      =   7485
  14.    ShowInTaskbar   =   0   'False
  15.    Begin VB.Frame Frame1 
  16.       Height          =   570
  17.       Left            =   0
  18.       TabIndex        =   1
  19.       Top             =   -90
  20.       Width           =   7485
  21.       Begin VB.CommandButton cmdNP 
  22.          Caption         =   ">"
  23.          Height          =   285
  24.          Index           =   1
  25.          Left            =   7110
  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            =   6210
  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            =   6570
  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           =   4755
  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          =   4110
  68.       Left            =   105
  69.       Locked          =   -1  'True
  70.       MultiLine       =   -1  'True
  71.       ScrollBars      =   2  'Vertical
  72.       TabIndex        =   0
  73.       Top             =   630
  74.       Width           =   7260
  75.    End
  76. End
  77. Attribute VB_Name = "frmRas"
  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 = 25
  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. Private Sub cmb_Function_Click()
  96.    
  97.    If (IsLoaded = False) Then Exit Sub
  98.    
  99.    Call cDisableFI(mdiT2W.Picture1)
  100.    
  101.    txt_Result = ""
  102.    
  103.    DoEvents
  104.    
  105.    Select Case cmb_Function.ListIndex
  106.       Case 0
  107.          Call TestRasGetCountryInfo
  108.    End Select
  109.  
  110.    DoEvents
  111.    Call cEnableFI(mdiT2W.Picture1)
  112.    
  113. End Sub
  114.  
  115.  
  116. Private Sub cmdNP_Click(Index As Integer)
  117.  
  118.    Call sub_NextPrev(cmb_Function, Index)
  119.  
  120. End Sub
  121.  
  122. Private Sub Form_Activate()
  123.  
  124.    mdiT2W.Label2.Caption = cInsertBlocks(mdiT2W.Label2.Tag, "" & Iteration)
  125.  
  126. End Sub
  127.  
  128. Private Sub Form_Load()
  129.  
  130.    IsLoaded = False
  131.    
  132.    Show
  133.  
  134.    Call sub_Load_Combo(cmb_Function, T2WDirInst + "_ras.t2w")
  135.    
  136.    IsLoaded = True
  137.    
  138. End Sub
  139.  
  140. Private Sub Command1_Click()
  141.    
  142.    Call cmb_Function_Click
  143.    
  144. End Sub
  145.  
  146. Private Sub TestRasGetCountryInfo()
  147.  
  148.    Dim intResult        As Integer
  149.    Dim strDisplay       As String
  150.    
  151.    Dim i                As Integer
  152.    
  153.    strDisplay = ""
  154.    
  155.    Dim CI               As tagCOUNTRYINFO
  156.    
  157.    intResult = cRasGetCountryInfo(0, CI, True)
  158.    
  159.    strDisplay = strDisplay & "Code" & vbTab & "ID" & vbTab & "Name" & vbCrLf & vbCrLf
  160.       
  161.    Do While (intResult = RAS_SUCCESS)
  162.    
  163.       strDisplay = strDisplay & CI.iCountryCode & vbTab & CI.iCountryID & vbTab & CI.sCountryName & vbCrLf
  164.       
  165.       intResult = cRasGetCountryInfo(0, CI, False)
  166.    
  167.    Loop
  168.    
  169.    txt_Result = strDisplay
  170.  
  171.    'time the function
  172.  
  173.    TimerHandle = cTimerOpen()
  174.    TimerStartOk = cTimerStart(TimerHandle)
  175.    
  176.    For i = 1 To Iteration
  177.       intResult = cRasGetCountryInfo(0, CI, True)
  178.    Next i
  179.    
  180.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  181.    
  182.    TimerCloseOk = cTimerClose(TimerHandle)
  183.    
  184. End Sub
  185.  
  186.