home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form HelpScrn
- BackColor = &H00C0C0C0&
- Caption = "Help Screen"
- ClientHeight = 4200
- ClientLeft = 975
- ClientTop = 2100
- ClientWidth = 7575
- Height = 4605
- Left = 915
- LinkTopic = "Form1"
- ScaleHeight = 4200
- ScaleWidth = 7575
- Top = 1755
- Width = 7695
- Begin ComboBox HelpTopic
- Height = 300
- Left = 3120
- TabIndex = 0
- Text = " "
- Top = 120
- Width = 4215
- End
- Begin CommandButton PrintHelp
- Caption = "Print Topic"
- Height = 255
- Left = 5760
- TabIndex = 2
- Top = 3720
- Width = 1575
- End
- Begin CommandButton Return
- Caption = "Return"
- Height = 255
- Left = 240
- TabIndex = 1
- Top = 3720
- Width = 1215
- End
- Begin TextBox DisplayHelp
- Height = 3015
- Left = 240
- MultiLine = -1 'True
- ScrollBars = 2 'Vertical
- TabIndex = 3
- TabStop = 0 'False
- Text = " "
- Top = 600
- Width = 7095
- End
- ' Helpscrn is a FREEWARE product. While it is
- ' copywritten, you are encouraged to share it as
- ' long as you do not remove this message.
- ' HELPSCRN written by Ed Crygier (C)opyright 1992
- ' Requires Visual Basic version 2.0 to incorporate
- ' in your program or VBRUN200.DLL to use as a stand
- ' alone program.
- Dim IndexTopic(100) As String
- ' Number of Topics, Number of Lines per topic
- Dim HelpText(100, 55) As String
- Sub Form_Load ()
- NL$ = Chr$(13) + Chr$(10) 'sets a carraige return
- FileNum = FreeFile ' find the next free file
- Open "HelpFile.Txt" For Input As FileNum 'the help text
- TopicNbr = 0 ' initialize
- ReadARecord:
- If EOF(FileNum) Then GoTo LeaveHere
- TopicNbr = TopicNbr + 1
- Line Input #FileNum, IndexTopic(TopicNbr)
- X = InStr(" ", IndexTopic(TopicNbr))
- HelpTopic.AddItem Mid$(IndexTopic(TopicNbr), X + 1, Len(IndexTopic(TopicNbr)) - X)
- LineNbr = 0
- MoreLines:
- LineNbr = LineNbr + 1
- Line Input #FileNum, HelpText(TopicNbr, LineNbr)
- If Left$(HelpText(TopicNbr, LineNbr), 1) = "#" Then
- GoTo ReadARecord
- Else
- If Len(HelpText(TopicNbr, LineNbr)) = 0 Then GoTo LeaveHere
- HelpText(TopicNbr, LineNbr) = HelpText(TopicNbr, LineNbr) + NL$
- GoTo MoreLines
- End If
- LeaveHere:
- Close #FileNum
- HelpTopic.ListIndex = 0
- End Sub
- Sub HelpTopic_Click ()
- ShowIt
- End Sub
- Sub PrintHelp_Click ()
- X = MsgBox("Insure printer is turned on. OK to continue?", 36, "Print Topic")
- If X = 6 Then
- Printer.Print IndexTopic(HelpTopic.ListIndex + 1)
- Printer.Print DisplayHelp.Text
- Printer.EndDoc
- End If
- End Sub
- Sub Return_Click ()
- Unload HelpScrn
- End Sub
- Sub ShowIt ()
- y = HelpTopic.ListIndex + 1
- z = 0
- DisplayHelp.Text = ""
- ReadALine:
- z = z + 1
- If Left$(HelpText(y, z), 1) = "#" Then Exit Sub
- DisplayHelp.Text = DisplayHelp.Text + HelpText(y, z)
- GoTo ReadALine
- End Sub
-