home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / tool / helpfile / ezhelp / ezhelp.frm < prev    next >
Text File  |  1995-02-27  |  3KB  |  132 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. End
  58. Sub Command1_Click ()
  59. form2.Hide
  60. form1.Refresh
  61. SendKeys "%A"
  62. End Sub
  63.  
  64. Sub endhelpcom_click ()
  65. form2.Hide
  66. form1.Refresh
  67. SendKeys "%A"
  68. End Sub
  69.  
  70. Sub Form_GotFocus ()
  71. screen.MousePointer = 1
  72. End Sub
  73.  
  74. Sub Form_Load ()
  75.  
  76. On Error GoTo nohelp
  77. nl$ = Chr$(13) + Chr$(10)
  78. helpindex$ = "EZHELP.IDX"
  79. Open helpindex$ For Input As #2
  80. Do While Not EOF(2)
  81. Line Input #2, item$
  82. list1.AddItem (item$)
  83. Loop
  84. Close #2
  85. helpfile$ = "EZHELP.HLP"
  86. Open helpfile$ For Input As #2
  87. Do While Not EOF(2)
  88. Line Input #2, helpline$
  89. helptext$ = helptext$ + helpline$ + nl$
  90. Loop
  91. text1.Text = helptext$
  92. Close #2
  93. screen.MousePointer = 1
  94. GoTo endhelp
  95. nohelp:
  96. nohelpflag = 1
  97. msg$ = "Can't find help files. Must be in VBASIC Directory!"
  98. MsgBox msg$, 0, "EZHELP File Error!"
  99. Resume endhelp
  100. endhelp:
  101. If nohelpflag = 1 Then endhelpcom_click
  102. End Sub
  103.  
  104. Sub List1_Click ()
  105. text1.SelStart = Len(text1.Text)
  106. text1.SetFocus
  107. If InStr(text1.Text, list1.Text) > 1 Then
  108.     text1.SelStart = InStr(text1.Text, list1.Text) - 1
  109.     text1.SelLength = CSng(Len(list1.Text))
  110. End If
  111. End Sub
  112.  
  113. Sub List1_GotFocus ()
  114. screen.MousePointer = 1
  115. End Sub
  116.  
  117. Sub Text1_GotFocus ()
  118. screen.MousePointer = 1
  119. End Sub
  120.  
  121. Sub Text1_KeyPress (keyascii As Integer)
  122. keyascii = 0
  123. text1.Text = helptext$
  124. list1.SetFocus
  125. End Sub
  126.  
  127. Sub Text1_KeyUp (KeyCode As Integer, Shift As Integer)
  128. text1.Text = helptext$
  129. list1.SetFocus
  130. End Sub
  131.  
  132.