home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Toolbox / Visual Basic Toolbox (P.I.E.)(1996).ISO / database / randomfa / help.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-12-29  |  2.7 KB  |  93 lines

  1. VERSION 2.00
  2. Begin Form frmHelp 
  3.    BackColor       =   &H00808000&
  4.    Caption         =   "Notes about the Protoype Random Access Application"
  5.    ClientHeight    =   5400
  6.    ClientLeft      =   1800
  7.    ClientTop       =   1695
  8.    ClientWidth     =   7665
  9.    Height          =   5805
  10.    Left            =   1740
  11.    LinkTopic       =   "Form1"
  12.    MaxButton       =   0   'False
  13.    MinButton       =   0   'False
  14.    ScaleHeight     =   5400
  15.    ScaleWidth      =   7665
  16.    Top             =   1350
  17.    Width           =   7785
  18.    Begin CommandButton cmdOK 
  19.       Caption         =   "&OK"
  20.       Height          =   375
  21.       Left            =   135
  22.       TabIndex        =   0
  23.       Top             =   4920
  24.       Width           =   7440
  25.    End
  26.    Begin TextBox txtMsg 
  27.       Height          =   4785
  28.       Left            =   90
  29.       MultiLine       =   -1  'True
  30.       ScrollBars      =   2  'Vertical
  31.       TabIndex        =   1
  32.       Top             =   60
  33.       Width           =   7485
  34.    End
  35. Option Explicit
  36. Dim findChanged     As Integer
  37. Sub cmdOK_Click ()
  38.     SAVEFILE
  39.     Unload Me
  40. End Sub
  41. Sub Form_Load ()
  42.     Me.Move ((Screen.Width - Me.Width) / 2), ((Screen.Height - Me.Height) / 2)
  43.     LOADFILE
  44. End Sub
  45. Sub Form_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  46.     If Button = 2 Then  'Right Mouse Button Clicked
  47.         SAVEFILE
  48.     End If
  49. End Sub
  50. Sub LOADFILE ()
  51.     On Error GoTo TextLoadError
  52.     Dim strFilename     As String
  53.     Dim intChannel      As Integer
  54.     intChannel = FreeFile
  55.     strFilename = App.Path & "\help.txt"
  56.     Open strFilename For Input As intChannel
  57.     txtMsg = Input$(LOF(intChannel), intChannel)
  58.     findChanged = False
  59. Exiter:
  60.     Close #intChannel
  61.     Exit Sub
  62. TextLoadError:
  63.     MsgBox "Error opening help.txt file" & Chr$(13) & Error$
  64.      Resume Exiter
  65. End Sub
  66. Sub SAVEFILE ()
  67.     On Error GoTo TextSaveError
  68.     Dim strFilename     As String
  69.     Dim intChannel      As Integer
  70.     intChannel = FreeFile
  71.     strFilename = App.Path & "\help.txt"
  72.     Open strFilename For Output As intChannel
  73.     Print #intChannel, txtMsg.Text
  74.     If findChanged = True Then
  75.         MsgBox "Help.txt file was updated and saved OK", , "Random Access Help Panel"
  76.         findChanged = False
  77.     End If
  78. ExitSave:
  79.     Close #intChannel
  80.     Exit Sub
  81. TextSaveError:
  82.     MsgBox "Error saving help.txt file" & Chr$(13) & Error$
  83.      Resume ExitSave
  84. End Sub
  85. Sub txtMsg_Change ()
  86.     findChanged = True
  87. End Sub
  88. Sub txtMsg_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  89.     If Button = 2 Then  'Right Mouse Button Clicked
  90.         SAVEFILE
  91.     End If
  92. End Sub
  93.