home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / tool / helpfile / ezhelp / ezhelp.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-02-27  |  3.0 KB  |  119 lines

  1. VERSION 2.00
  2. Begin Form Form2 
  3.    Caption         =   "Rockford! Professional: Help"
  4.    ClientHeight    =   5670
  5.    ClientLeft      =   240
  6.    ClientTop       =   1365
  7.    ClientWidth     =   9045
  8.    Height          =   6600
  9.    Left            =   180
  10.    LinkMode        =   1  'Source
  11.    LinkTopic       =   "Form2"
  12.    ScaleHeight     =   5670
  13.    ScaleWidth      =   9045
  14.    Top             =   495
  15.    Width           =   9165
  16.    Begin ListBox List1 
  17.       Height          =   5100
  18.       Left            =   120
  19.       TabIndex        =   0
  20.       Top             =   480
  21.       Width           =   3135
  22.    End
  23.    Begin TextBox Text1 
  24.       Height          =   5415
  25.       Left            =   3360
  26.       MultiLine       =   -1  'True
  27.       ScrollBars      =   2  'Vertical
  28.       TabIndex        =   1
  29.       Text            =   "Text1"
  30.       Top             =   120
  31.       Width           =   5655
  32.    End
  33.    Begin CommandButton Command1 
  34.       Cancel          =   -1  'True
  35.       Caption         =   "Return"
  36.       Height          =   255
  37.       Left            =   2640
  38.       TabIndex        =   3
  39.       Top             =   120
  40.       Width           =   735
  41.    End
  42.    Begin Label Label1 
  43.       Alignment       =   2  'Center
  44.       AutoSize        =   -1  'True
  45.       BackColor       =   &H00C0C0C0&
  46.       BorderStyle     =   1  'Fixed Single
  47.       Caption         =   "Topic Index -- Click to View "
  48.       Height          =   225
  49.       Left            =   120
  50.       TabIndex        =   2
  51.       Top             =   120
  52.       Width           =   2460
  53.    End
  54.    Begin Menu endhelpcom 
  55.       Caption         =   "&Return To Calling Program"
  56.    End
  57. Sub Command1_Click ()
  58. form2.Hide
  59. form1.Refresh
  60. SendKeys "%A"
  61. End Sub
  62. Sub endhelpcom_click ()
  63. form2.Hide
  64. form1.Refresh
  65. SendKeys "%A"
  66. End Sub
  67. Sub Form_GotFocus ()
  68. screen.MousePointer = 1
  69. End Sub
  70. Sub Form_Load ()
  71. On Error GoTo nohelp
  72. nl$ = Chr$(13) + Chr$(10)
  73. helpindex$ = "EZHELP.IDX"
  74. Open helpindex$ For Input As #2
  75. Do While Not EOF(2)
  76. Line Input #2, item$
  77. list1.AddItem (item$)
  78. Close #2
  79. helpfile$ = "EZHELP.HLP"
  80. Open helpfile$ For Input As #2
  81. Do While Not EOF(2)
  82. Line Input #2, helpline$
  83. helptext$ = helptext$ + helpline$ + nl$
  84. text1.Text = helptext$
  85. Close #2
  86. screen.MousePointer = 1
  87. GoTo endhelp
  88. nohelp:
  89. nohelpflag = 1
  90. msg$ = "Can't find help files. Must be in VBASIC Directory!"
  91. MsgBox msg$, 0, "EZHELP File Error!"
  92. Resume endhelp
  93. endhelp:
  94. If nohelpflag = 1 Then endhelpcom_click
  95. End Sub
  96. Sub List1_Click ()
  97. text1.SelStart = Len(text1.Text)
  98. text1.SetFocus
  99. If InStr(text1.Text, list1.Text) > 1 Then
  100.     text1.SelStart = InStr(text1.Text, list1.Text) - 1
  101.     text1.SelLength = CSng(Len(list1.Text))
  102. End If
  103. End Sub
  104. Sub List1_GotFocus ()
  105. screen.MousePointer = 1
  106. End Sub
  107. Sub Text1_GotFocus ()
  108. screen.MousePointer = 1
  109. End Sub
  110. Sub Text1_KeyPress (keyascii As Integer)
  111. keyascii = 0
  112. text1.Text = helptext$
  113. list1.SetFocus
  114. End Sub
  115. Sub Text1_KeyUp (KeyCode As Integer, Shift As Integer)
  116. text1.Text = helptext$
  117. list1.SetFocus
  118. End Sub
  119.