home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / tool / various / vbstra / strdllap.frm < prev    next >
Text File  |  1995-02-26  |  19KB  |  721 lines

  1. VERSION 2.00
  2. Begin Form StrDLLApp 
  3.    BackColor       =   &H00C0C0C0&
  4.    Caption         =   "VBstrAPI.DLL Demonstrator"
  5.    ClientHeight    =   5985
  6.    ClientLeft      =   45
  7.    ClientTop       =   1410
  8.    ClientWidth     =   8070
  9.    Height          =   6360
  10.    Icon            =   STRDLLAP.FRX:0000
  11.    Left            =   0
  12.    LinkTopic       =   "Form1"
  13.    ScaleHeight     =   5985
  14.    ScaleWidth      =   8070
  15.    Top             =   1080
  16.    Width           =   8160
  17.    Begin ListBox List 
  18.       BackColor       =   &H00808000&
  19.       FontBold        =   0   'False
  20.       FontItalic      =   0   'False
  21.       FontName        =   "Fixedsys"
  22.       FontSize        =   9
  23.       FontStrikethru  =   0   'False
  24.       FontUnderline   =   0   'False
  25.       Height          =   1605
  26.       Left            =   5520
  27.       TabIndex        =   8
  28.       Tag             =   "OL"
  29.       Top             =   270
  30.       Width           =   2475
  31.    End
  32.    Begin TextBox Monitor 
  33.       BackColor       =   &H00C0C0C0&
  34.       FontBold        =   0   'False
  35.       FontItalic      =   0   'False
  36.       FontName        =   "Fixedsys"
  37.       FontSize        =   9
  38.       FontStrikethru  =   0   'False
  39.       FontUnderline   =   0   'False
  40.       Height          =   675
  41.       Left            =   150
  42.       MousePointer    =   1  'Arrow
  43.       MultiLine       =   -1  'True
  44.       ScrollBars      =   3  'Both
  45.       TabIndex        =   1
  46.       Tag             =   "OL"
  47.       Top             =   1980
  48.       Width           =   5265
  49.    End
  50.    Begin PictureBox ToolBar 
  51.       BackColor       =   &H00808000&
  52.       Height          =   1875
  53.       Left            =   0
  54.       ScaleHeight     =   1845
  55.       ScaleWidth      =   5400
  56.       TabIndex        =   0
  57.       Tag             =   "OL"
  58.       Top             =   0
  59.       Width           =   5430
  60.       Begin PictureBox Picture1 
  61.          AutoSize        =   -1  'True
  62.          BorderStyle     =   0  'None
  63.          Height          =   1800
  64.          Left            =   2970
  65.          Picture         =   STRDLLAP.FRX:0302
  66.          ScaleHeight     =   1800
  67.          ScaleWidth      =   2400
  68.          TabIndex        =   7
  69.          Top             =   30
  70.          Width           =   2400
  71.       End
  72.       Begin SSCommand biQuit 
  73.          Caption         =   "&Exit"
  74.          Font3D          =   1  'Raised w/light shading
  75.          ForeColor       =   &H00000000&
  76.          Height          =   1800
  77.          Left            =   2250
  78.          Picture         =   STRDLLAP.FRX:28FC
  79.          RoundedCorners  =   0   'False
  80.          TabIndex        =   6
  81.          Top             =   30
  82.          Width           =   705
  83.       End
  84.       Begin SSCommand biArray 
  85.          Caption         =   "&ArrayStr"
  86.          Font3D          =   1  'Raised w/light shading
  87.          Height          =   900
  88.          Left            =   1140
  89.          Picture         =   STRDLLAP.FRX:2B66
  90.          RoundedCorners  =   0   'False
  91.          TabIndex        =   5
  92.          Top             =   930
  93.          Width           =   1095
  94.       End
  95.       Begin SSCommand biCat 
  96.          Caption         =   "&CatStr"
  97.          Font3D          =   1  'Raised w/light shading
  98.          Height          =   900
  99.          Left            =   30
  100.          Picture         =   STRDLLAP.FRX:2E68
  101.          RoundedCorners  =   0   'False
  102.          TabIndex        =   4
  103.          Top             =   930
  104.          Width           =   1095
  105.       End
  106.       Begin SSCommand biCopy 
  107.          Caption         =   "C&opyFile"
  108.          Font3D          =   1  'Raised w/light shading
  109.          Height          =   885
  110.          Left            =   1140
  111.          Picture         =   STRDLLAP.FRX:316A
  112.          RoundedCorners  =   0   'False
  113.          TabIndex        =   3
  114.          Top             =   30
  115.          Width           =   1095
  116.       End
  117.       Begin SSCommand biFind 
  118.          Caption         =   "&FindString"
  119.          Font3D          =   1  'Raised w/light shading
  120.          Height          =   885
  121.          Left            =   30
  122.          Picture         =   STRDLLAP.FRX:346C
  123.          RoundedCorners  =   0   'False
  124.          TabIndex        =   2
  125.          Tag             =   "OL"
  126.          Top             =   30
  127.          Width           =   1095
  128.       End
  129.    End
  130.    Begin Label Label1 
  131.       AutoSize        =   -1  'True
  132.       BackColor       =   &H00C0C0C0&
  133.       BackStyle       =   0  'Transparent
  134.       Caption         =   "ArrayStr Demonstration List Box"
  135.       ForeColor       =   &H00800000&
  136.       Height          =   195
  137.       Left            =   5520
  138.       TabIndex        =   9
  139.       Top             =   30
  140.       Width           =   2700
  141.    End
  142. End
  143. Option Explicit
  144.  
  145. Sub ArrayExample ()
  146. '
  147. ' Demonstration example of ArrayStr usage
  148. '
  149.  Dim SHandle As Integer ' ArrayStr object handle
  150.  Dim ii      As Long    ' iterator
  151.  Dim rc      As Long    ' return code
  152.  
  153.     ' create the sample array string
  154.  
  155.     SHandle = CreateNewStringArray(10, 1024)
  156.  
  157.     '
  158.     ' If successful, then away we go
  159.     '
  160.     
  161.     If SHandle > -1 Then
  162.  
  163.         '
  164.         '  We'll start by filling the ArrayStr in Serial Mode
  165.         '
  166.         For ii = 0 To 9
  167.  
  168.             ' put the string NEXT in the list
  169.  
  170.             rc = PutArrayNext(SHandle, " Originally at line " & ii + 1)
  171.  
  172.             If rc < 0 Then
  173.             
  174.                 MsgBox "ArrayStr Overflow! Unable to continue.", 48, "PutArrayNext Error"
  175.                 DestroyStringArray SHandle
  176.                 
  177.                 Exit Sub
  178.             
  179.             End If
  180.  
  181.         Next
  182.  
  183.         ' now insert a string at index #3
  184.  
  185.         rc = InsertArrayStr(SHandle, 3, "!! Inserted at line 4")
  186.         
  187.         ' now delete the last string
  188.  
  189.         rc = DeleteArrayStr(SHandle, 9)
  190.  
  191.         ' replace the entry #7 with a message using Random Access
  192.  
  193.         rc = PutArrayStr(SHandle, 7, "!! Changed line 8 with PutArrayStr")
  194.  
  195.         ' place a note in the last entry that it was deleted
  196.  
  197.         rc = PutArrayStr(SHandle, 9, "!! Entry deleted by DeleteArrayStr")
  198.  
  199.         ' reset the current line pointer to the first entry
  200.  
  201.         ArrayStrSetCLP SHandle, 0
  202.  
  203.  
  204.         ' using Serial Mode, fill the demonstration list box
  205.  
  206.         List.Visible = False
  207.         For ii = 1 To 10
  208.  
  209.             List.AddItem Format$(ii, "00") & GetArrayNext(SHandle)
  210.  
  211.         Next
  212.         List.Visible = True
  213.  
  214.         ' ALWAYS REMEMBER TO DESTROY THE ARRAYSTR WHEN FINISHED
  215.  
  216.         DestroyStringArray SHandle
  217.  
  218.     Else
  219.  
  220.         MsgBox "Not enough memory to create the ArrayStr Object!", 48, "ArrayStr Create Error"
  221.  
  222.     End If
  223.  
  224. End Sub
  225.  
  226. Sub biArray_Click ()
  227. Dim CHandle As Integer
  228. Dim rc As Integer
  229.  
  230.     ' This call is used to display the demonstration
  231.     ' code for the program.  Please don't look behind
  232.     ' that curtain. (The Wizard of OZ)
  233.     
  234.     LocateCode "Sub Array" & "Example", "End Sub" & Chr$(13)
  235.     
  236.     ArrayExample
  237.  
  238.     CHandle = CreateNewCatString(4096)
  239.  
  240.     rc = CatStrAddLine(CHandle, "Examine the Code in the Code Window below.")
  241.     rc = CatStrAddLine(CHandle, "")
  242.     rc = CatStrAddLine(CHandle, "Then examine the contents of the ListBox.")
  243.     rc = CatStrAddLine(CHandle, "")
  244.     rc = CatStrAddLine(CHandle, "The ListBox demonstrates the result of the example code.")
  245.  
  246.     HintMsg CHandle, "ArrayStr Example Code"
  247.  
  248.     DestroyCatString CHandle
  249.  
  250. End Sub
  251.  
  252. Sub biCat_Click ()
  253.  Dim rc      As Integer
  254.  Dim CHandle As Integer
  255.  
  256.     ' This call is used to display the demonstration
  257.     ' code for the program.  Please don't look behind
  258.     ' that curtain. (The Wizard of OZ)
  259.     
  260.     On Error Resume Next
  261.     
  262.     List.Clear
  263.     Kill "CatStr.Txt"
  264.     CHandle = CreateNewCatString(4096)
  265.     
  266.     Monitor = ""
  267.     LocateCode "Sub Cat" & "Example", "End Sub" & Chr$(13)
  268.  
  269.     rc = CatStrAddLine(CHandle, "What follows is a demonstration of CatStr vs VB String concatenation times for a 32k string. Only 32k strings are demonstrated because VB can not handle larger strings.")
  270.     rc = CatStrAddLine(CHandle, "")
  271.     rc = CatStrAddLine(CHandle, "When the demonstration is complete, take a look at the code below to see how it works.")
  272.  
  273.     HintMsg CHandle, "CatStr Example Code"
  274.     DoEvents
  275.  
  276.     CatExample
  277.     DestroyCatString CHandle
  278.  
  279. End Sub
  280.  
  281. '
  282. ' Note: The use of CatStrAddLine in this sub is purely
  283. '       for demonstration purposes.
  284. '
  285. Sub biCopy_Click ()
  286. Dim CHandle As Integer
  287. Dim rc As Integer
  288.  
  289.     CopyExample
  290.     
  291.     CHandle = CreateNewCatString(4096)
  292.  
  293.     rc = CatStrAddLine(CHandle, "Examine the Code in the Code Window below.")
  294.     rc = CatStrAddLine(CHandle, "")
  295.     rc = CatStrAddLine(CHandle, "The Code in the Code Window demonstrates how to use the CopyFile function.")
  296.     rc = CatStrAddLine(CHandle, "")
  297.     rc = CatStrAddLine(CHandle, "The new file is located in the same directory.")
  298.  
  299.     HintMsg CHandle, "CopyFile Example Code"
  300.  
  301.     DestroyCatString CHandle
  302.     
  303.     ' This call is used to display the demonstration
  304.     ' code for the program.  Please don't look behind
  305.     ' that curtain. (The Wizard of OZ)
  306.     
  307.     LocateCode "Sub Copy" & "Example", "End Sub" & Chr$(13)
  308.    
  309. End Sub
  310.  
  311. '
  312. ' Example use of the FindString() and CatStr Objects
  313. '
  314. Sub biFind_Click ()
  315. Dim CHandle As Integer
  316. Dim rc As Integer
  317.  
  318.     CHandle = CreateNewCatString(4096)
  319.  
  320.     rc = CatStrAddLine(CHandle, "You are about to see a demonstration of how FindString performs against InStr.  FindString works best with large strings and medium size targets (more than 3 characters).")
  321.     rc = CatStrAddLine(CHandle, "")
  322.     rc = CatStrAddLine(CHandle, "After the dialog boxes have shown you how it performs, check out the code in the code window.")
  323.  
  324.     HintMsg CHandle, "FindString vs InStr Example Code"
  325.     DoEvents
  326.  
  327.     DestroyCatString CHandle
  328.  
  329.     ' This call is used to display the demonstration
  330.     ' code for the program.  Please don't look behind
  331.     ' that curtain. (The Wizard of OZ)
  332.     
  333.     FindExample
  334.     LocateCode "Sub Find" & "Example", "End Sub" & Chr$(13)
  335.     
  336. End Sub
  337.  
  338. Sub biQuit_Click ()
  339.  
  340.     Unload Me
  341.  
  342. End Sub
  343.  
  344. '
  345. ' Demonstration of how CatStr out performs VB Strings
  346. ' in concatenation speed.
  347. '
  348. Sub CatExample ()
  349.  
  350.  Dim CHandle As Integer ' CatStr Object Handle
  351.  Dim rc      As Integer ' return code
  352.  Dim Temp    As String  ' temp string variable for save
  353.  Dim t                  ' timer accumulator
  354.  Dim VBTime
  355.  
  356.     On Error Resume Next
  357.  
  358.     ' create the maximum CatStr Object
  359.  
  360.     CHandle = CreateNewCatString(32768)
  361.  
  362.     ' Fail if not enough memory
  363.  
  364.     If CHandle < 0 Then
  365.  
  366.         MsgBox "Unable to allocate 32k for CatStr!", 48, "CatStr Create Error"
  367.         Exit Sub
  368.                 
  369.     End If
  370.  
  371.     
  372.     ' Use 'On Error Goto' to trap when string is full
  373.     '
  374.     ' NOTE: This is the fastest way to do this and simulates
  375.     '       CatStr objects more fairly than determining the
  376.     '       length of the string with Len().
  377.     
  378.  
  379. ' ****************** Visual Basic String Test ************************
  380.     
  381.     On Error GoTo VBStrFull
  382.     
  383.     Temp$ = ""
  384.     
  385.     Screen.MousePointer = 11
  386.     t = Timer
  387.     While True
  388.  
  389.         Temp$ = Temp$ & "This is a sample line of text."
  390.  
  391.     Wend
  392.  
  393. VBStrFull:
  394.  
  395.     t = Timer - t
  396.     Screen.MousePointer = 0
  397.  
  398.     On Error Resume Next
  399.     VBTime = t
  400.  
  401.     MsgBox "Concatenating a " & Len(Temp$) & " character Visual Basic String took " & Format$(t, "Standard") & " seconds."
  402.     
  403.     
  404. ' ******************** CatStr String Test ****************************
  405.     
  406.     rc = 0
  407.  
  408.     Screen.MousePointer = 11
  409.     t = Timer
  410.     While rc = 0
  411.  
  412.         rc = CatStrAddLine(CHandle, "This is a sample line of text.")
  413.  
  414.     Wend
  415.     t = Timer - t
  416.     Screen.MousePointer = 0
  417.  
  418.     MsgBox "Concatenating a " & CatStrLength(CHandle) & " character CatStr took " & Format$(t, "Standard") & " seconds."
  419.     
  420.     
  421. ' ************************* Results **********************************
  422.  
  423.     If t < VBTime Then
  424.  
  425.         MsgBox "CatStr was " & Format$(VBTime / t, "Standard") & " times faster that VB!"
  426.  
  427.     Else
  428.         
  429.         MsgBox "VB was " & Format$(t / VBTime, "Standard") & " times faster that CatStr!"
  430.     
  431.     End If
  432.  
  433.  
  434.     ' ALWAYS REMEMBER TO DESTROY THE OBJECT WHEN FINISHED!
  435.     
  436.     DestroyCatString CHandle
  437.  
  438. End Sub
  439.  
  440. Sub CenterForm (TheForm As Form, OffsetLeft As Integer, OffsetTop As Integer)
  441. Dim FLeft As Integer
  442. Dim FTop As Integer
  443.     
  444.     If TheForm.WindowState <> 0 Then Exit Sub
  445.     
  446.     FLeft = ((Screen.Width - TheForm.Width) \ 2) + OffsetLeft
  447.     FTop = (((Screen.Height - TheForm.Height) \ 2) + OffsetTop) * .85
  448.     
  449.     If TheForm.Left = FLeft And TheForm.Top = FTop Then Exit Sub
  450.     
  451.     TheForm.Move FLeft, FTop
  452.  
  453. End Sub
  454.  
  455. Sub CopyExample ()
  456. Dim rc As Integer
  457.     
  458.     rc = CopyFile("STRDLLAP.FRM", "COPYFILE.TXT")
  459.  
  460.     If rc < 0 Then MsgBox "CopyFile Function failed!", 48, "CopyFile Error #" & rc
  461.  
  462. End Sub
  463.  
  464. Sub FindExample ()
  465. '
  466. '  Sample of FindString usage
  467. '
  468. '  Many thanks to Jim Moran at Honeywell for the challenge of
  469. '  this example!
  470. '
  471. '  Don't forget to check out CatStrFind() in the help file!
  472. '
  473.  Dim SrcString    As String
  474.  Dim TargetString As String
  475.  Dim locn         As Long
  476.  Dim InStrTime
  477.  Dim FindStringTime
  478.  Dim ii           As Integer
  479.  
  480.     
  481.     SrcString = String$(32000, "A") + "BBB"
  482.     TargetString = "AAAAAAAAAAAABBB"
  483.  
  484.     ' first show how InStr performs
  485.     
  486.     Screen.MousePointer = 11
  487.     InStrTime = Timer
  488.     For ii = 1 To 10
  489.  
  490.         locn = InStr(1, SrcString, TargetString)
  491.  
  492.     Next
  493.     InStrTime = Timer - InStrTime
  494.     Screen.MousePointer = 0
  495.  
  496.     MsgBox "(Found At " & locn & ") InStr took " & Format$(InStrTime / 10, "###.###0") & " seconds."
  497.     
  498.     ' now show how FindString performs
  499.     
  500.     Screen.MousePointer = 11
  501.     FindStringTime = Timer
  502.     For ii = 1 To 10
  503.  
  504.         locn = FindString(1, SrcString, TargetString)
  505.  
  506.     Next
  507.     FindStringTime = Timer - FindStringTime
  508.     Screen.MousePointer = 0
  509.  
  510.     MsgBox "(Found At " & locn & ") FindString took " & Format$(FindStringTime / 10, "###.###0") & " seconds."
  511.     
  512.     If FindStringTime < InStrTime Then
  513.  
  514.         MsgBox "FindString was " & Format$(InStrTime / FindStringTime, "###.###0") & " times faster."
  515.  
  516.     Else
  517.         
  518.         MsgBox "InStr was " & Format$(FindStringTime / InStrTime, "###.###0") & " times faster."
  519.     
  520.     End If
  521.     
  522. End Sub
  523.  
  524. Sub Form_Load ()
  525.  
  526.     On Error Resume Next
  527.  
  528.     CenterForm Me, 0, 0
  529.     ChDir App.Path
  530.  
  531.     Me.Top = Screen.Height * .05
  532.     Me.Height = Screen.Height * .9
  533.     Me.Left = Screen.Width * .05
  534.     Me.Width = Screen.Width * .9
  535.  
  536.     Me.Show
  537.  
  538. End Sub
  539.  
  540. Sub Form_Paint ()
  541.  
  542.     Outlines Me
  543.  
  544. End Sub
  545.  
  546. Sub Form_Resize ()
  547.  
  548.     On Error Resume Next
  549.  
  550.     Monitor.Top = ToolBar.Height + 120
  551.     Monitor.Left = 120
  552.     Monitor.Width = ScaleWidth - 240
  553.     Monitor.Height = ScaleHeight - ToolBar.Height - 240
  554.     List.Width = ScaleWidth - List.Left - 120
  555.  
  556. End Sub
  557.  
  558. '
  559. ' This subroutine demonstrates how CatStr (and ArrayStr) Objects
  560. ' can be passed to other functions using only the handle.
  561. '
  562. Sub HintMsg (CHandle As Integer, Title As String)
  563.  
  564.     HintDialog.Caption = Title
  565.     HintDialog.Hint = CatStrCopy(CHandle)
  566.     HintDialog.Show 1
  567.  
  568. End Sub
  569.  
  570. Sub LocateCode (Head As String, Tail As String)
  571. '
  572. ' This subroutine is used by the demonstration program to
  573. ' read the form file, locate the desired subroutine (beginning and
  574. ' end) and then highlight the text.
  575. '
  576. ' It also serves as an example of the FindStringIC function.
  577. '
  578.  
  579.  Dim File    As Integer  ' file handle to load STRDLLAP.FRM
  580.  Dim Buf     As String   ' line buffer
  581.  Dim CHandle As Integer  ' CatStr Object handle
  582.  Dim rc      As Integer  ' return code
  583.  Dim Looping As Integer  ' looping switch while reading file
  584.  Dim locn    As Long     ' location pointer for FindStringIC
  585.  Dim length  As Long     ' calculated length of located text
  586.  
  587.     ' locate a free file handle
  588.  
  589.     MousePointer = 11
  590.     List.Clear
  591.     Monitor.Visible = False
  592.     Monitor = ""
  593.  
  594.     File = FreeFile
  595.  
  596.     ' create a new CatStr object
  597.  
  598.     CHandle = CreateNewCatString(32768)
  599.  
  600.     ' open and read the file
  601.     
  602.     Open "STRDLLAPP.FRM" For Input As #File
  603.  
  604.     Looping = True
  605.     While Not EOF(File) And Looping
  606.  
  607.         Line Input #File, Buf
  608.  
  609.         ' use the CatStr object to buffer the
  610.         ' lines read from the file
  611.  
  612.         rc = CatStrAddLine(CHandle, Buf)
  613.  
  614.         '
  615.         ' stop if no more room in the buffer
  616.         '
  617.         If rc < 0 Then ' can't read any more
  618.             Looping = False
  619.         End If
  620.  
  621.     Wend
  622.  
  623.     Close #File
  624.     
  625.     '
  626.     ' search for the subroutine declaration
  627.     '
  628.     locn = CatStrFind(CHandle, 1, Head)
  629.     
  630.     '
  631.     ' As long as you haven't fiddled with the code
  632.     ' this should work
  633.     '
  634.     If locn > 0 Then
  635.     
  636.         length = CatStrFind(CHandle, locn, Tail) - locn + Len(Tail) - 1
  637.         Monitor = CatStrMid$(CHandle, locn, length)
  638.     
  639.     Else
  640.  
  641.         MsgBox "This example requires an un-modified version of STRDLLAPP.FRM", 48, "Demo Error"
  642.  
  643.     End If
  644.  
  645.     '
  646.     ' ALWAYS REMEMBER TO DESTROY THE OBJECT WHEN FINISHED
  647.     '
  648.  
  649.     DestroyCatString CHandle
  650.  
  651.     MousePointer = 0
  652.     Monitor.Visible = True
  653.     Monitor.SetFocus
  654.  
  655. End Sub
  656.  
  657. Sub Monitor_KeyPress (KeyAscii As Integer)
  658.  
  659.     KeyAscii = 0
  660.  
  661. End Sub
  662.  
  663. Sub Outlines (FormName As Form)
  664.     
  665. Dim drkgray     As Long
  666. Dim fullwhite   As Long
  667. Dim i           As Integer
  668. Dim ctop        As Integer
  669. Dim cleft       As Integer
  670. Dim cright      As Integer
  671. Dim cbottom     As Integer
  672. Dim Offset      As Integer
  673.  
  674.     On Error Resume Next
  675.     
  676.     Dim cName As Control
  677.     Offset = 0
  678.  
  679.     FormName.Cls
  680.     
  681.     drkgray = RGB(128, 128, 128)
  682.     fullwhite = RGB(255, 255, 255)
  683.  
  684.     For i = 0 To (FormName.Controls.Count - 1)
  685.         
  686.         Set cName = FormName.Controls(i)
  687.  
  688.         If TypeOf cName Is Menu Then
  689.  
  690.             GoTo SkipThisControl
  691.             
  692.         End If
  693.             
  694.         
  695.         If (UCase(cName.Tag) = "OL") Then
  696.                 
  697.             ctop = cName.Top - Screen.TwipsPerPixelY
  698.             cleft = cName.Left - Screen.TwipsPerPixelX
  699.             cright = cName.Left + cName.Width + (Screen.TwipsPerPixelX * Offset)
  700.             cbottom = cName.Top + cName.Height + (Screen.TwipsPerPixelY * Offset)
  701.             
  702.             FormName.Line (cleft, ctop)-(cright, ctop), drkgray
  703.             FormName.Line (cleft, ctop)-(cleft, cbottom), drkgray
  704.             FormName.Line (cleft, cbottom)-(cright, cbottom), fullwhite
  705.             FormName.Line (cright, ctop)-(cright, cbottom), fullwhite
  706.         
  707.         End If
  708.  
  709. SkipThisControl:
  710.     
  711.     Next i
  712.  
  713. End Sub
  714.  
  715. Sub ToolBar_Click ()
  716.  
  717.     Outlines Me
  718.  
  719. End Sub
  720.  
  721.