home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form frmMultiDelim
- Caption = "Parse Demo - Parse Test With Multiple Character Delimiter"
- ClientHeight = 5475
- ClientLeft = 120
- ClientTop = 735
- ClientWidth = 9075
- Height = 6195
- Icon = MDELIM.FRX:0000
- Left = 45
- LinkTopic = "Form1"
- ScaleHeight = 5475
- ScaleWidth = 9075
- Top = 90
- Width = 9225
- Begin CommandButton cmdReturn
- Caption = "&Return To Main Menu"
- Height = 435
- Left = 5820
- TabIndex = 19
- Top = 480
- Width = 2715
- End
- Begin CommandButton cmdChange
- Caption = "&Change"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 315
- Left = 4140
- TabIndex = 21
- Top = 660
- Width = 915
- End
- Begin CommandButton cmdClear
- Caption = "C&lear"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 285
- Left = 7515
- TabIndex = 18
- Top = 1800
- Width = 555
- End
- Begin CommandButton cmdLoadEx
- Caption = "&Load Example"
- Height = 330
- Left = 195
- TabIndex = 0
- Top = 2280
- Width = 3090
- End
- Begin TextBox txtFullString
- Height = 285
- Left = 1200
- TabIndex = 5
- Tag = "txtFullString"
- Top = 1815
- Width = 6270
- End
- Begin TextBox txtDelim
- Height = 285
- Left = 1200
- TabIndex = 3
- Top = 1410
- Width = 1095
- End
- Begin CommandButton cmdParse
- Caption = "&Parse"
- Height = 330
- Left = 3615
- TabIndex = 1
- Top = 2280
- Width = 3750
- End
- Begin Shape Shape1
- Height = 1215
- Left = 120
- Shape = 4 'Rounded Rectangle
- Top = 60
- Width = 5160
- End
- Begin Label Label3
- Alignment = 2 'Center
- BorderStyle = 1 'Fixed Single
- Caption = "Currently Selected Function"
- Height = 315
- Left = 1440
- TabIndex = 20
- Top = 180
- Width = 2475
- End
- Begin Label lblCurFunc
- Caption = "lblCurFunc"
- FontBold = -1 'True
- FontItalic = -1 'True
- FontName = "MS Sans Serif"
- FontSize = 9.75
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 375
- Left = 540
- TabIndex = 22
- Top = 660
- Width = 3375
- End
- Begin Label lblString
- BorderStyle = 1 'Fixed Single
- Height = 270
- Index = 11
- Left = 4155
- TabIndex = 17
- Top = 4770
- Width = 3000
- End
- Begin Label lblString
- BorderStyle = 1 'Fixed Single
- Height = 270
- Index = 10
- Left = 4155
- TabIndex = 16
- Top = 4395
- Width = 3000
- End
- Begin Label lblString
- BorderStyle = 1 'Fixed Single
- Height = 270
- Index = 9
- Left = 4155
- TabIndex = 15
- Top = 4020
- Width = 3000
- End
- Begin Label lblString
- BorderStyle = 1 'Fixed Single
- Height = 270
- Index = 8
- Left = 4155
- TabIndex = 14
- Top = 3630
- Width = 3000
- End
- Begin Label lblString
- BorderStyle = 1 'Fixed Single
- Height = 270
- Index = 7
- Left = 4155
- TabIndex = 13
- Top = 3240
- Width = 3000
- End
- Begin Label lblString
- BorderStyle = 1 'Fixed Single
- Height = 270
- Index = 6
- Left = 4155
- TabIndex = 12
- Top = 2880
- Width = 3000
- End
- Begin Label lblString
- BorderStyle = 1 'Fixed Single
- Height = 270
- Index = 5
- Left = 855
- TabIndex = 10
- Top = 4770
- Width = 3000
- End
- Begin Label lblString
- BorderStyle = 1 'Fixed Single
- Height = 270
- Index = 4
- Left = 855
- TabIndex = 11
- Top = 4395
- Width = 3000
- End
- Begin Label lblString
- BorderStyle = 1 'Fixed Single
- Height = 270
- Index = 3
- Left = 855
- TabIndex = 9
- Top = 4005
- Width = 3000
- End
- Begin Label lblString
- BorderStyle = 1 'Fixed Single
- Height = 270
- Index = 2
- Left = 855
- TabIndex = 8
- Top = 3615
- Width = 3000
- End
- Begin Label lblString
- BorderStyle = 1 'Fixed Single
- Height = 270
- Index = 1
- Left = 855
- TabIndex = 7
- Top = 3240
- Width = 3000
- End
- Begin Label lblString
- BorderStyle = 1 'Fixed Single
- Height = 270
- Index = 0
- Left = 855
- TabIndex = 6
- Top = 2880
- Width = 3000
- End
- Begin Label Label2
- Caption = "&Full String:"
- Height = 255
- Left = 210
- TabIndex = 4
- Top = 1830
- Width = 930
- End
- Begin Label Label1
- Caption = "&Delimiter:"
- Height = 255
- Left = 210
- TabIndex = 2
- Top = 1410
- Width = 900
- End
- Begin Menu mnuExit
- Caption = "E&xit!"
- End
- Option Explicit
- Sub cmdChange_Click ()
- Me.WindowState = MINIMIZED
- Screen.MousePointer = HOURGLASS
- SetfrmSelect (lblCurFunc), FLG_MULTIDELIM
- End Sub
- Sub cmdClear_Click ()
- txtFullString = ""
- txtFullString.SetFocus
- End Sub
- Sub cmdLoadEx_Click ()
- txtDelim = "|delim|"
- txtFullString = "This|delim|is|delim|a test of|delim|ParseAndFillArray|delim|routine."
- cmdParse.SetFocus
- End Sub
- Sub cmdParse_Click ()
- Dim numelements%, i%
- Dim TheString$, Delim$
- Dim DynArray$()
- Screen.MousePointer = HOURGLASS
- 'clear out labels
- For i% = 0 To 11
- lblString(i%) = ""
- Next i%
- 'allow them to clear
- DoEvents
- TheString$ = txtFullString
- Delim$ = txtDelim
- 'call the appropriate function
- If lblCurFunc = "ParseAndFillArray1%()" Then
- numelements% = ParseAndFillArray1%(TheString$, Delim$, DynArray$())
- ElseIf lblCurFunc = "ParseAndFillArray2%()" Then
- numelements% = ParseAndFillArray2%(TheString$, Delim$, DynArray$(), 10)
- Else
- numelements% = ParseAndFillListBox%(TheString$, Delim$, frmListBox!List1)
- End If
- 'set max of 12 string parts for sake of example
- If numelements% > 12 Then
- numelements% = 12
- End If
- 'put elements into labels
- For i% = 1 To numelements%
- lblString(i% - 1) = DynArray$(i%)
- Next i%
- Screen.MousePointer = DEFAULT
- End Sub
- Sub cmdReturn_Click ()
- Me.WindowState = MINIMIZED
- frmMain.Show
- frmMain.WindowState = NORMAL
- End Sub
- Sub Form_Activate ()
- Screen.MousePointer = DEFAULT
- End Sub
- Sub Form_Unload (Cancel As Integer)
- End
- End Sub
- Sub mnuExit_Click ()
- EndProg
- End Sub
-