home *** CD-ROM | disk | FTP | other *** search
/ Hot Shareware 32 / hot34.iso / ficheros / LVB / T2W32523.ZIP / _ISX.FRM < prev    next >
Text File  |  1998-04-07  |  10KB  |  334 lines

  1. VERSION 5.00
  2. Object = "{0BA686C6-F7D3-101A-993E-0000C0EF6F5E}#1.0#0"; "THREED32.OCX"
  3. Begin VB.Form frmIsX 
  4.    BorderStyle     =   4  'Fixed ToolWindow
  5.    Caption         =   "IsX"
  6.    ClientHeight    =   4485
  7.    ClientLeft      =   1890
  8.    ClientTop       =   3270
  9.    ClientWidth     =   7485
  10.    MaxButton       =   0   'False
  11.    MDIChild        =   -1  'True
  12.    PaletteMode     =   1  'UseZOrder
  13.    ScaleHeight     =   4485
  14.    ScaleWidth      =   7485
  15.    ShowInTaskbar   =   0   'False
  16.    Begin Threed.SSPanel SSPanel2 
  17.       Align           =   2  'Align Bottom
  18.       Height          =   465
  19.       Left            =   0
  20.       TabIndex        =   1
  21.       Top             =   4020
  22.       Width           =   7485
  23.       _Version        =   65536
  24.       _ExtentX        =   13203
  25.       _ExtentY        =   820
  26.       _StockProps     =   15
  27.       BackColor       =   12632256
  28.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  29.          Name            =   "MS Sans Serif"
  30.          Size            =   8.25
  31.          Charset         =   0
  32.          Weight          =   400
  33.          Underline       =   0   'False
  34.          Italic          =   0   'False
  35.          Strikethrough   =   0   'False
  36.       EndProperty
  37.       Begin VB.TextBox Text1 
  38.          Height          =   285
  39.          Left            =   1440
  40.          TabIndex        =   2
  41.          Tag             =   "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  42.          Top             =   90
  43.          Width           =   5055
  44.       End
  45.       Begin Threed.SSCommand SSCommand2 
  46.          Height          =   285
  47.          Left            =   6570
  48.          TabIndex        =   3
  49.          Top             =   90
  50.          Width           =   825
  51.          _Version        =   65536
  52.          _ExtentX        =   1455
  53.          _ExtentY        =   503
  54.          _StockProps     =   78
  55.          Caption         =   "&Reset"
  56.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  57.             Name            =   "MS Sans Serif"
  58.             Size            =   8.25
  59.             Charset         =   0
  60.             Weight          =   400
  61.             Underline       =   0   'False
  62.             Italic          =   0   'False
  63.             Strikethrough   =   0   'False
  64.          EndProperty
  65.          BevelWidth      =   1
  66.          Outline         =   0   'False
  67.       End
  68.       Begin VB.Label Label1 
  69.          Caption         =   "&Enter a test string"
  70.          Height          =   255
  71.          Left            =   90
  72.          TabIndex        =   4
  73.          Top             =   120
  74.          Width           =   1275
  75.       End
  76.    End
  77.    Begin Threed.SSPanel SSPanel1 
  78.       Align           =   1  'Align Top
  79.       Height          =   480
  80.       Left            =   0
  81.       TabIndex        =   5
  82.       Top             =   0
  83.       Width           =   7485
  84.       _Version        =   65536
  85.       _ExtentX        =   13203
  86.       _ExtentY        =   847
  87.       _StockProps     =   15
  88.       ForeColor       =   -2147483640
  89.       BackColor       =   12632256
  90.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  91.          Name            =   "MS Sans Serif"
  92.          Size            =   8.25
  93.          Charset         =   0
  94.          Weight          =   400
  95.          Underline       =   0   'False
  96.          Italic          =   0   'False
  97.          Strikethrough   =   0   'False
  98.       EndProperty
  99.       Begin VB.ComboBox cmb_Function 
  100.          Height          =   315
  101.          Left            =   1365
  102.          TabIndex        =   6
  103.          Top             =   90
  104.          Width           =   4785
  105.       End
  106.       Begin Threed.SSCommand cmdNP 
  107.          Height          =   300
  108.          Index           =   1
  109.          Left            =   7140
  110.          TabIndex        =   10
  111.          Top             =   90
  112.          Width           =   255
  113.          _Version        =   65536
  114.          _ExtentX        =   450
  115.          _ExtentY        =   529
  116.          _StockProps     =   78
  117.          Caption         =   ">"
  118.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  119.             Name            =   "MS Sans Serif"
  120.             Size            =   8.25
  121.             Charset         =   0
  122.             Weight          =   400
  123.             Underline       =   0   'False
  124.             Italic          =   0   'False
  125.             Strikethrough   =   0   'False
  126.          EndProperty
  127.          BevelWidth      =   1
  128.          Font3D          =   3
  129.          RoundedCorners  =   0   'False
  130.          Outline         =   0   'False
  131.       End
  132.       Begin Threed.SSCommand cmdNP 
  133.          Height          =   300
  134.          Index           =   0
  135.          Left            =   6300
  136.          TabIndex        =   9
  137.          Top             =   90
  138.          Width           =   255
  139.          _Version        =   65536
  140.          _ExtentX        =   450
  141.          _ExtentY        =   529
  142.          _StockProps     =   78
  143.          Caption         =   "<"
  144.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  145.             Name            =   "MS Sans Serif"
  146.             Size            =   8.25
  147.             Charset         =   0
  148.             Weight          =   400
  149.             Underline       =   0   'False
  150.             Italic          =   0   'False
  151.             Strikethrough   =   0   'False
  152.          EndProperty
  153.          BevelWidth      =   1
  154.          Font3D          =   3
  155.          RoundedCorners  =   0   'False
  156.          Outline         =   0   'False
  157.       End
  158.       Begin Threed.SSCommand SSCommand1 
  159.          Default         =   -1  'True
  160.          Height          =   300
  161.          Left            =   6615
  162.          TabIndex        =   7
  163.          Top             =   90
  164.          Width           =   465
  165.          _Version        =   65536
  166.          _ExtentX        =   820
  167.          _ExtentY        =   529
  168.          _StockProps     =   78
  169.          Caption         =   "&Go"
  170.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  171.             Name            =   "MS Sans Serif"
  172.             Size            =   8.25
  173.             Charset         =   0
  174.             Weight          =   400
  175.             Underline       =   0   'False
  176.             Italic          =   0   'False
  177.             Strikethrough   =   0   'False
  178.          EndProperty
  179.          BevelWidth      =   1
  180.          RoundedCorners  =   0   'False
  181.          Outline         =   0   'False
  182.       End
  183.       Begin VB.Label Label2 
  184.          Caption         =   "&Select a function"
  185.          Height          =   255
  186.          Left            =   90
  187.          TabIndex        =   8
  188.          Top             =   120
  189.          Width           =   1275
  190.       End
  191.    End
  192.    Begin VB.Label lbl_Result 
  193.       Appearance      =   0  'Flat
  194.       BackColor       =   &H80000005&
  195.       BackStyle       =   0  'Transparent
  196.       ForeColor       =   &H80000008&
  197.       Height          =   3270
  198.       Left            =   90
  199.       TabIndex        =   0
  200.       Top             =   630
  201.       Width           =   7305
  202.    End
  203. End
  204. Attribute VB_Name = "frmIsX"
  205. Attribute VB_GlobalNameSpace = False
  206. Attribute VB_Creatable = False
  207. Attribute VB_PredeclaredId = True
  208. Attribute VB_Exposed = False
  209. Option Explicit
  210. Option Base 1
  211.  
  212. Private Const Iteration = 250
  213.  
  214. Dim IsLoaded         As Integer
  215.  
  216. Dim TimerStartOk     As Integer
  217. Dim TimerCloseOk     As Integer
  218.  
  219. Dim TimerHandle      As Integer
  220. Dim TimerValue       As Long
  221.  
  222. Private Sub cmdNP_Click(Index As Integer)
  223.  
  224.    Call sub_NextPrev(cmb_Function, Index)
  225.  
  226. End Sub
  227.  
  228.  
  229. Private Sub cmb_Function_Click()
  230.    
  231.    If (IsLoaded = False) Then Exit Sub
  232.    
  233.    Call cDisableFI(mdiT2W.Picture1)
  234.    
  235.    lbl_Result = ""
  236.    
  237.    DoEvents
  238.    
  239.    Select Case cmb_Function.ListIndex
  240.       Case 0
  241.          Call TestIsX
  242.    End Select
  243.  
  244.    DoEvents
  245.    Call cEnableFI(mdiT2W.Picture1)
  246.    
  247. End Sub
  248.  
  249.  
  250. Private Sub Form_Activate()
  251.  
  252.    mdiT2W.Label2.Caption = cInsertBlocks(mdiT2W.Label2.Tag, "" & Iteration)
  253.  
  254. End Sub
  255.  
  256. Private Sub Form_Load()
  257.  
  258.    IsLoaded = False
  259.    
  260.    Show
  261.  
  262.    Text1.Text = Text1.Tag + LCase$(Text1.Tag)
  263.  
  264.    Call sub_Load_Combo(cmb_Function, T2WDirInst + "_isx.t2w")
  265.    
  266.    IsLoaded = True
  267.    
  268. End Sub
  269.  
  270. Private Sub SSCommand1_Click()
  271.    
  272.    Call cmb_Function_Click
  273.    
  274. End Sub
  275.  
  276. Private Sub TestIsX()
  277.  
  278.    Dim intResult        As Integer
  279.    Dim strResult        As String
  280.    Dim strDisplay       As String
  281.    
  282.    Dim i                As Integer
  283.    
  284.    Dim Str1             As String
  285.    
  286.    strResult = ""
  287.    strDisplay = ""
  288.    
  289.    Str1 = Text1.Text
  290.  
  291.    strDisplay = "[" & Str1 & "] is " & vbCrLf & vbCrLf
  292.  
  293.    strDisplay = strDisplay & IIf(cIsDigit(Str1), "Digit", " not Digit") & vbCrLf
  294.    strDisplay = strDisplay & IIf(cIsXdigit(Str1), "XDigit", " not XDigit") & vbCrLf
  295.    strDisplay = strDisplay & IIf(cIsAlpha(Str1), "Alpha", " not Alpha") & vbCrLf
  296.    strDisplay = strDisplay & IIf(cIsLower(Str1), "Lower", " not Lower") & vbCrLf
  297.    strDisplay = strDisplay & IIf(cIsUpper(Str1), "Upper", " not Upper") & vbCrLf
  298.    strDisplay = strDisplay & IIf(cIsAlnum(Str1), "Alnum", " not Alnum") & vbCrLf
  299.    strDisplay = strDisplay & IIf(cIsUpper(Str1), "Upper", " not Upper") & vbCrLf
  300.    strDisplay = strDisplay & IIf(cIsSpace(Str1), "Space", " not Space") & vbCrLf
  301.    strDisplay = strDisplay & IIf(cIsPunct(Str1), "Punct", " not Punct") & vbCrLf
  302.    strDisplay = strDisplay & IIf(cIsAscii(Str1), "Ascii", " not Ascii") & vbCrLf
  303.    strDisplay = strDisplay & IIf(cIsCsym(Str1), "Csym", " not Csym") & vbCrLf
  304.    strDisplay = strDisplay & IIf(cIsCsymf(Str1), "Csymf", " not Csymf") & vbCrLf
  305.    strDisplay = strDisplay & IIf(cIsISBN(Str1), "ISBN", " not ISBN") & vbCrLf
  306.    strDisplay = strDisplay & IIf(cIsPrime(Val(Str1)), "Prime", " not Prime") & vbCrLf & vbCrLf
  307.      
  308.    lbl_Result = strDisplay
  309.  
  310.    'time the function
  311.  
  312.    TimerHandle = cTimerOpen()
  313.    TimerStartOk = cTimerStart(TimerHandle)
  314.    
  315.    For i = 1 To Iteration
  316.       intResult = cIsDigit(Str1)
  317.    Next i
  318.    
  319.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  320.    
  321.    TimerCloseOk = cTimerClose(TimerHandle)
  322.  
  323. End Sub
  324.  
  325. Private Sub SSCommand2_Click()
  326.    
  327.    Text1.Text = Text1.Tag + LCase$(Text1.Tag)
  328.    
  329.    Call SSCommand1_Click
  330.    
  331. End Sub
  332.  
  333.  
  334.