home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 5_2007-2008.ISO / data / Zips / Simple_Hel2076717222007.psc / SHComposer.frm < prev    next >
Text File  |  2007-07-22  |  21KB  |  620 lines

  1. VERSION 5.00
  2. Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
  3. Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
  4. Begin VB.Form SHComposer 
  5.    BorderStyle     =   1  'Fixed Single
  6.    Caption         =   "Simple Help Composer"
  7.    ClientHeight    =   4185
  8.    ClientLeft      =   45
  9.    ClientTop       =   435
  10.    ClientWidth     =   7860
  11.    Icon            =   "SHComposer.frx":0000
  12.    LinkTopic       =   "Form1"
  13.    MaxButton       =   0   'False
  14.    MinButton       =   0   'False
  15.    ScaleHeight     =   4185
  16.    ScaleWidth      =   7860
  17.    StartUpPosition =   3  'Windows Default
  18.    Begin MSComDlg.CommonDialog CD1 
  19.       Left            =   840
  20.       Top             =   4830
  21.       _ExtentX        =   847
  22.       _ExtentY        =   847
  23.       _Version        =   393216
  24.       CancelError     =   -1  'True
  25.    End
  26.    Begin VB.PictureBox Tbar 
  27.       BorderStyle     =   0  'None
  28.       Height          =   510
  29.       Index           =   0
  30.       Left            =   210
  31.       ScaleHeight     =   34
  32.       ScaleMode       =   3  'Pixel
  33.       ScaleWidth      =   491
  34.       TabIndex        =   4
  35.       Top             =   210
  36.       Width           =   7365
  37.       Begin VB.CommandButton cmdBut 
  38.          Height          =   435
  39.          Index           =   4
  40.          Left            =   2520
  41.          Picture         =   "SHComposer.frx":076A
  42.          Style           =   1  'Graphical
  43.          TabIndex        =   10
  44.          ToolTipText     =   "Save As"
  45.          Top             =   0
  46.          Width           =   435
  47.       End
  48.       Begin VB.CommandButton cmdBut 
  49.          Height          =   435
  50.          Index           =   0
  51.          Left            =   0
  52.          Picture         =   "SHComposer.frx":0ED4
  53.          Style           =   1  'Graphical
  54.          TabIndex        =   8
  55.          ToolTipText     =   "Exit"
  56.          Top             =   0
  57.          Width           =   435
  58.       End
  59.       Begin VB.CommandButton cmdBut 
  60.          Height          =   435
  61.          Index           =   1
  62.          Left            =   630
  63.          Picture         =   "SHComposer.frx":163E
  64.          Style           =   1  'Graphical
  65.          TabIndex        =   7
  66.          ToolTipText     =   "New"
  67.          Top             =   0
  68.          Width           =   435
  69.       End
  70.       Begin VB.CommandButton cmdBut 
  71.          Height          =   435
  72.          Index           =   2
  73.          Left            =   1260
  74.          Picture         =   "SHComposer.frx":1DA8
  75.          Style           =   1  'Graphical
  76.          TabIndex        =   6
  77.          ToolTipText     =   "Open"
  78.          Top             =   0
  79.          Width           =   435
  80.       End
  81.       Begin VB.CommandButton cmdBut 
  82.          Height          =   435
  83.          Index           =   3
  84.          Left            =   1890
  85.          Picture         =   "SHComposer.frx":2512
  86.          Style           =   1  'Graphical
  87.          TabIndex        =   5
  88.          ToolTipText     =   "Save"
  89.          Top             =   0
  90.          Width           =   435
  91.       End
  92.       Begin VB.Label Label1 
  93.          Caption         =   "Simple Help Composer"
  94.          BeginProperty Font 
  95.             Name            =   "Lucida Handwriting"
  96.             Size            =   15.75
  97.             Charset         =   0
  98.             Weight          =   400
  99.             Underline       =   0   'False
  100.             Italic          =   0   'False
  101.             Strikethrough   =   0   'False
  102.          EndProperty
  103.          Height          =   435
  104.          Left            =   3255
  105.          TabIndex        =   9
  106.          Top             =   0
  107.          Width           =   4110
  108.       End
  109.    End
  110.    Begin MSComctlLib.ImageList ImageList1 
  111.       Left            =   210
  112.       Top             =   4725
  113.       _ExtentX        =   1005
  114.       _ExtentY        =   1005
  115.       BackColor       =   -2147483643
  116.       ImageWidth      =   24
  117.       ImageHeight     =   24
  118.       MaskColor       =   12632256
  119.       _Version        =   393216
  120.       BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  121.          NumListImages   =   2
  122.          BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  123.             Picture         =   "SHComposer.frx":2C7C
  124.             Key             =   ""
  125.          EndProperty
  126.          BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  127.             Picture         =   "SHComposer.frx":33F6
  128.             Key             =   ""
  129.          EndProperty
  130.       EndProperty
  131.    End
  132.    Begin VB.Frame Frame2 
  133.       Caption         =   "Description"
  134.       Height          =   3270
  135.       Left            =   3465
  136.       TabIndex        =   1
  137.       Top             =   840
  138.       Width           =   4215
  139.       Begin VB.CheckBox Instruct 
  140.          Caption         =   "Instructions"
  141.          Height          =   225
  142.          Left            =   1470
  143.          TabIndex        =   11
  144.          Top             =   2940
  145.          Value           =   1  'Checked
  146.          Width           =   1380
  147.       End
  148.       Begin VB.TextBox Text1 
  149.          BeginProperty Font 
  150.             Name            =   "Courier New"
  151.             Size            =   8.25
  152.             Charset         =   0
  153.             Weight          =   400
  154.             Underline       =   0   'False
  155.             Italic          =   0   'False
  156.             Strikethrough   =   0   'False
  157.          EndProperty
  158.          Height          =   2640
  159.          Index           =   0
  160.          Left            =   105
  161.          Locked          =   -1  'True
  162.          MultiLine       =   -1  'True
  163.          ScrollBars      =   2  'Vertical
  164.          TabIndex        =   2
  165.          TabStop         =   0   'False
  166.          Top             =   210
  167.          Width           =   4005
  168.       End
  169.    End
  170.    Begin VB.Frame Frame1 
  171.       Caption         =   "Contents"
  172.       Height          =   3270
  173.       Left            =   105
  174.       TabIndex        =   0
  175.       Top             =   840
  176.       Width           =   3270
  177.       Begin MSComctlLib.TreeView TV1 
  178.          Height          =   2955
  179.          Left            =   105
  180.          TabIndex        =   3
  181.          Top             =   210
  182.          Width           =   3060
  183.          _ExtentX        =   5398
  184.          _ExtentY        =   5212
  185.          _Version        =   393217
  186.          HideSelection   =   0   'False
  187.          Indentation     =   706
  188.          LabelEdit       =   1
  189.          Style           =   5
  190.          FullRowSelect   =   -1  'True
  191.          HotTracking     =   -1  'True
  192.          ImageList       =   "ImageList1"
  193.          Appearance      =   1
  194.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  195.             Name            =   "Arial"
  196.             Size            =   8.25
  197.             Charset         =   0
  198.             Weight          =   400
  199.             Underline       =   0   'False
  200.             Italic          =   0   'False
  201.             Strikethrough   =   0   'False
  202.          EndProperty
  203.       End
  204.    End
  205.    Begin VB.Shape Shape1 
  206.       BorderColor     =   &H00C0C0C0&
  207.       Height          =   645
  208.       Index           =   0
  209.       Left            =   105
  210.       Top             =   105
  211.       Width           =   7575
  212.    End
  213.    Begin VB.Menu NodeEdit 
  214.       Caption         =   "EditNode"
  215.       Visible         =   0   'False
  216.       Begin VB.Menu DoNode 
  217.          Caption         =   "Add"
  218.          Index           =   0
  219.       End
  220.       Begin VB.Menu DoNode 
  221.          Caption         =   "Delete"
  222.          Index           =   1
  223.       End
  224.       Begin VB.Menu DoNode 
  225.          Caption         =   "Insert"
  226.          Index           =   2
  227.          Visible         =   0   'False
  228.       End
  229.       Begin VB.Menu DoNode 
  230.          Caption         =   "-"
  231.          Index           =   3
  232.       End
  233.       Begin VB.Menu DoNode 
  234.          Caption         =   "Rename"
  235.          Index           =   4
  236.       End
  237.    End
  238. End
  239. Attribute VB_Name = "SHComposer"
  240. Attribute VB_GlobalNameSpace = False
  241. Attribute VB_Creatable = False
  242. Attribute VB_PredeclaredId = True
  243. Attribute VB_Exposed = False
  244. Option Explicit
  245. '----------------------------------------------------------\
  246. 'Author: Richard E. Gagnon.                                |
  247. 'URL:    http://members.cox.net/reg501/                    |
  248. 'Email:  reg501@cox.net                                    |
  249. 'Copyright ⌐ 2007 Richard E. Gagnon. All Rights Reserved.  |
  250. '----------------------------------------------------------/
  251. Private Const SC = 234      'Content Node Start
  252. Private Const FC = 235      'Content Node End
  253. Private Const SS1 = 224     'Subject1 Title Start
  254. Private Const FS1 = 229     'Subject1 Title End
  255. Private Const ST1 = 244     'Subject1 Text Start
  256. Private Const FT1 = 246     'Subject1 Text End
  257. Private Const SS2 = 251     'Subject2 Title Start
  258. Private Const FS2 = 252     'Subject2 Title End
  259. Private Const ST2 = 236     'Subject2 Text Start
  260. Private Const FT2 = 237     'Subject2 Text End
  261. Private HelpSpace() As Byte 'Open File Array
  262. Private FL As Long          'Open File Length
  263. Private OpenFileName As String
  264.  
  265. Private Sub cmdBut_Click(Index As Integer)
  266. Select Case Index
  267.     Case 0: Unload Me
  268.     Case 1: GoNew
  269.     Case 2: GoOpen
  270.     Case 3: GoSave False
  271.     Case 4: GoSave True
  272. End Select
  273. End Sub
  274. Private Sub SaveFile(fName As String)
  275. Dim Fnum As Integer
  276. Fnum = FreeFile
  277. Open fName For Output As Fnum
  278. Dim Node As Node
  279. For Each Node In TV1.Nodes
  280.     If Node.Tag = 0 Then
  281.         Print #Fnum, Chr(SC) & Node.Text & Chr(FC)
  282.         If Node.Children > 0 Then
  283.             Dim Child As Node
  284.             Set Child = TV1.Nodes(Node.Index).Child
  285.             Do Until Child Is Nothing
  286.                 Print #Fnum, Chr(SS1) & Child.Text & Chr(FS1)
  287.                 Print #Fnum, Chr(ST1) & Text1(Child.Tag).Text & Chr(FT1)
  288.                 If Child.Children > 0 Then
  289.                     Dim GrandChild As Node
  290.                     Set GrandChild = Child.Child
  291.                     Do Until GrandChild Is Nothing
  292.                         Print #Fnum, Chr(SS2) & GrandChild.Text & Chr(FS2)
  293.                         Print #Fnum, Chr(ST2) & Text1(GrandChild.Tag).Text & Chr(FT2)
  294.                         Set GrandChild = GrandChild.Next
  295.                     Loop
  296.                 End If
  297.                 Set Child = Child.Next
  298.             Loop
  299.         End If
  300.         Write #Fnum, "----------------------------------------"
  301.     End If
  302. Next
  303. Close Fnum
  304. Set Child = Nothing         'Free up memory
  305. Set GrandChild = Nothing    'Free up memory
  306. End Sub
  307. Private Sub GoSave(Stype As Boolean)
  308. On Error GoTo OPNerr
  309. If Stype Then
  310.     CD1.Filter = "SHF files (*.shf)|*.shf"
  311.     CD1.DialogTitle = "SAVE FILE AS"
  312.     CD1.FileName = OpenFileName
  313.     CD1.Flags = cdlOFNFileMustExist
  314.     CD1.ShowSave
  315.     OpenFileName = CD1.FileName
  316.     Me.Caption = OpenFileName
  317. End If
  318. If OpenFileName = "" Then
  319.     If Err <> 32755 Then MsgBox "No filename. Please enter a Filename" & vbCrLf & "Try using 'Save As' or 'New'", vbInformation, "No Filename"
  320. Else
  321.     SaveFile OpenFileName
  322.     Dim Fnum As Integer
  323.     FL = FileLen(OpenFileName)
  324.     If FL > 0 Then
  325.         Fnum = FreeFile
  326.         ReDim HelpSpace(1 To FL)
  327.         Open OpenFileName For Binary Access Read As Fnum
  328.         Get Fnum, , HelpSpace
  329.         Close Fnum
  330.     End If
  331. End If
  332. Exit Sub
  333. OPNerr:
  334. If Err <> 32755 Then MsgBox (Error & vbCr & vbCr & "Error Number: " & Str(Err)), vbCritical, "! ERROR !"
  335. End Sub
  336. Private Sub GoOpen()
  337. Dim Fnum As Integer
  338. Dim Node1 As Node, Node2 As Node, Node3 As Node
  339. Dim sText As String
  340. Dim S1 As Long
  341. Dim I As Long, J As Long, K As Long
  342. Dim FZ As Byte
  343. Dim TT As String
  344. On Error GoTo OPNerr
  345. CD1.Filter = "SHF files (*.shf)|*.shf"
  346. CD1.DialogTitle = "OPEN FILE"
  347. CD1.FileName = ""
  348. CD1.Flags = cdlOFNFileMustExist
  349. CD1.ShowOpen
  350. OpenFileName = CD1.FileName
  351. If OpenFileName <> "" Then
  352.     Me.Caption = OpenFileName
  353.     FL = FileLen(OpenFileName)
  354.     ClearAll
  355.     'Max file size = 2,147,483,647 bytes
  356.     If FL > 0 Then
  357.         Me.MousePointer = 11
  358.         Fnum = FreeFile
  359.         ReDim HelpSpace(1 To FL)
  360.         Open OpenFileName For Binary Access Read As Fnum
  361.         Get Fnum, , HelpSpace
  362.         Close Fnum
  363.         For I = 1 To FL
  364.             Select Case HelpSpace(I)
  365.                 Case SC: S1 = I + 1
  366.                 Case FC
  367.                     sText = ""
  368.                     For J = S1 To I - 1: sText = sText & Chr(HelpSpace(J)): Next J
  369.                     Set Node1 = TV1.Nodes.Add(, , , sText, 1, 1)
  370.                     Node1.Tag = 0
  371.                 Case SS1: S1 = I + 1
  372.                 Case FS1
  373.                     sText = ""
  374.                     For J = S1 To I - 1: sText = sText & Chr(HelpSpace(J)): Next J
  375.                     Set Node2 = TV1.Nodes.Add(Node1.Index, tvwChild, , sText, 2, 2)
  376.                     Node2.Tag = Text1.UBound + 1
  377.                     Load Text1(Node2.Tag)
  378.                     FormatTextBox (Node2.Tag)
  379.                 Case ST1: S1 = I + 1
  380.                 Case FT1:
  381.                     TT = ""
  382.                     For K = S1 To I - 1: TT = TT & Chr(HelpSpace(K)): Next K
  383.                     Text1(Node2.Tag).Text = TT
  384.                  Case SS2: S1 = I + 1
  385.                 Case FS2
  386.                     sText = ""
  387.                     For J = S1 To I - 1: sText = sText & Chr(HelpSpace(J)): Next J
  388.                     Set Node3 = TV1.Nodes.Add(Node2.Index, tvwChild, , sText, 2, 2)
  389.                     Node3.Tag = Text1.UBound + 1
  390.                     Load Text1(Node3.Tag)
  391.                     FormatTextBox (Node3.Tag)
  392.                 Case ST2: S1 = I + 1
  393.                 Case FT2:
  394.                     Node2.Image = 1
  395.                     Node2.SelectedImage = 1
  396.                     TT = ""
  397.                     For K = S1 To I - 1: TT = TT & Chr(HelpSpace(K)): Next K
  398.                     Text1(Node3.Tag).Text = TT
  399.             End Select
  400.         Next I
  401.         Me.MousePointer = 0
  402.     End If
  403. End If
  404. Set Node1 = Nothing  'Free up memory
  405. Set Node2 = Nothing  'Free up memory
  406. Set Node3 = Nothing  'Free up memory
  407. Exit Sub
  408. OPNerr:
  409. If Err <> 32755 Then MsgBox (Error & vbCr & vbCr & "Error Number: " & Str(Err)), vbCritical, "! ERROR !"
  410. End Sub
  411. Private Sub ClearAll()
  412. TV1.Nodes.Clear
  413. Dim control As TextBox
  414. For Each control In Text1
  415.     If control.Index > 0 Then Unload Text1(control.Index)
  416. Next
  417. End Sub
  418. Private Sub GoNew()
  419. On Error GoTo OPNerr
  420. Dim Confirm As Integer
  421. If OpenFileName = "" Then
  422.     Confirm = vbYes
  423. Else
  424.     Confirm = MsgBox("Are you sure you want to create a new Help File?", vbQuestion + vbYesNo, "New File")
  425. End If
  426. If Confirm = vbYes Then
  427.     CD1.Filter = "SHF files (*.shf)|*.shf"
  428.     CD1.DialogTitle = "NEW FILE"
  429.     CD1.FileName = ""
  430.     CD1.Flags = cdlOFNFileMustExist
  431.     CD1.ShowSave
  432.     OpenFileName = CD1.FileName
  433.     If OpenFileName <> "" Then
  434.         Me.Caption = OpenFileName
  435.         ClearAll
  436.     End If
  437. End If
  438. Exit Sub
  439. OPNerr:
  440. If Err <> 32755 Then MsgBox (Error & vbCr & vbCr & "Error Number: " & Str(Err)), vbCritical, "! ERROR !"
  441. End Sub
  442. Private Sub DoNode_Click(Index As Integer)
  443. Dim Node As Node
  444. Dim I As Integer
  445. Select Case Index
  446.     Case 0  'Add Node
  447.         If TV1.SelectedItem Is Nothing Then
  448.             Set Node = TV1.Nodes.Add(, , , "Content", 1, 1)
  449.             Node.Tag = 0
  450.         Else
  451.             Set Node = TV1.Nodes.Add(TV1.SelectedItem.Index, tvwChild, , "Subject", 2, 2)
  452.             Node.Tag = Text1.UBound + 1
  453.             Load Text1(Node.Tag)
  454.             FormatTextBox (Node.Tag)
  455.             TV1.SelectedItem.Expanded = True
  456.             If Node.Parent.Tag > 0 Then
  457.                 Node.Parent.Image = 1
  458.                 Node.Parent.SelectedImage = 1
  459.             End If
  460.         End If
  461.     Case 1  'Delete Node(s)
  462.         If Not TV1.SelectedItem Is Nothing Then
  463.             Set Node = TV1.Nodes(TV1.SelectedItem.Index)
  464.             UnloadTextBoxes Node
  465.             If Not Node.Parent Is Nothing Then
  466.                 If Node.Parent.Tag > 0 And Node.Parent.Children = 1 Then
  467.                     Node.Parent.Image = 2
  468.                     Node.Parent.SelectedImage = 2
  469.                 End If
  470.             End If
  471.             TV1.Nodes.Remove Node.Index
  472.             If Not TV1.SelectedItem Is Nothing Then
  473.                 If TV1.SelectedItem.Tag > 0 Then
  474.                     Text1(TV1.SelectedItem.Tag).ZOrder vbBringToFront
  475.                 Else
  476.                     Text1(0).ZOrder vbBringToFront
  477.                 End If
  478.             End If
  479.         End If
  480.     Case 2  'Insert Node
  481.          'Set Node1 = TV1.Nodes.Add(1, , , "TBD", 1, 1)
  482.     Case 4  'Rename Node
  483.         Dim TT As String
  484.         TT = InputBox("Enter Label Name", "Label Name", TV1.SelectedItem.Text)
  485.         If TT <> "" Then TV1.SelectedItem.Text = TT
  486.         TV1_NodeClick TV1.Nodes(TV1.SelectedItem.Index)
  487. End Select
  488. Set Node = Nothing  'Free up memory
  489. End Sub
  490.  
  491. Private Sub Form_Load()
  492. ShowInstructions
  493. End Sub
  494.  
  495. Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
  496. Dim Fnum As Integer
  497. Dim TempFname As String
  498. Dim TempSpace() As Byte
  499. Dim I As Integer
  500. Dim TFL As Long
  501. Dim control As TextBox
  502. TempFname = App.Path & "\SHTEMP.TMP"
  503. SaveFile TempFname
  504. TFL = FileLen(TempFname)
  505. If OpenFileName <> "" Then
  506.     I = vbNo
  507.     If TFL > 0 Then
  508.         Fnum = FreeFile
  509.         Open TempFname For Binary Access Read As Fnum
  510.         ReDim TempSpace(1 To TFL)
  511.         Get Fnum, , TempSpace
  512.         Close Fnum
  513.         If TFL <> FL Then
  514.             I = MsgBox("Save changes to '" & OpenFileName & "'?", vbYesNo + vbQuestion, "COMPOSER")
  515.         Else
  516.             Dim FS As Long
  517.             Dim Fequal As Boolean
  518.             Fequal = True
  519.             For FS = LBound(TempSpace) To UBound(TempSpace)
  520.                 If TempSpace(FS) <> HelpSpace(FS) Then Fequal = False
  521.             Next FS
  522.             If Not Fequal Then
  523.                 I = MsgBox("Save changes to '" & OpenFileName & "'?", vbYesNo + vbQuestion, "COMPOSER")
  524.             End If
  525.         End If
  526.     Else
  527.         If TFL <> FL Then I = MsgBox("Save changes to '" & OpenFileName & "'?", vbYesNo + vbQuestion, "COMPOSER")
  528.     End If
  529.     If I = vbYes Then GoSave False
  530. Else
  531.     If TFL > 0 Then GoSave True
  532. End If
  533. Kill TempFname
  534. For Each control In Text1
  535.     If control.Index > 0 Then Unload Text1(control.Index)
  536. Next
  537. End Sub
  538.  
  539. Private Sub Instruct_Click()
  540. If Instruct.Value = 0 Then
  541.     Text1(0).Text = ""
  542.     If Not TV1.SelectedItem Is Nothing Then
  543.         TV1_NodeClick TV1.Nodes(TV1.SelectedItem.Index)
  544.     End If
  545. Else
  546.     ShowInstructions
  547. End If
  548. End Sub
  549.  
  550. Private Sub TV1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
  551. If Button = 2 Then
  552.     If TV1.HitTest(x, y) Is Nothing Then
  553.         DoNode(0).Caption = "Add Content"
  554.         DoNode(0).Visible = True
  555.         DoNode(1).Visible = False
  556.         DoNode(3).Visible = False
  557.         DoNode(4).Visible = False
  558.         TV1.SelectedItem = Nothing
  559.     Else
  560.         TV1.HitTest(x, y).Selected = True
  561.         DoNode(1).Visible = True
  562.         DoNode(3).Visible = True
  563.         DoNode(4).Visible = True
  564.         If TV1.SelectedItem.Tag = 0 Then
  565.             DoNode(0).Visible = True
  566.             DoNode(0).Caption = "Add Subject"
  567.             DoNode(1).Caption = "Delete Content"
  568.         Else
  569.             If TV1.SelectedItem.Parent.Tag = 0 Then
  570.                 DoNode(0).Caption = "Add Subject"
  571.                 DoNode(1).Caption = "Delete Subject"
  572.                 DoNode(0).Visible = True
  573.             Else
  574.                 DoNode(0).Visible = False
  575.                 DoNode(1).Caption = "Delete Subject"
  576.             End If
  577.         End If
  578.     End If
  579.     Me.PopupMenu NodeEdit
  580. End If
  581. End Sub
  582.  
  583. Private Sub TV1_NodeClick(ByVal Node As MSComctlLib.Node)
  584. If Node.Tag > 0 Then
  585.     Text1(Node.Tag).ZOrder vbBringToFront
  586. Else
  587.     Text1(0).ZOrder vbBringToFront
  588. End If
  589. End Sub
  590. Private Sub FormatTextBox(Index As Integer)
  591. With Text1(Index)
  592.     Set .Container = Frame2
  593.     .Text = ""
  594.     .ZOrder vbSendToBack
  595.     .Locked = False
  596.     .Visible = True
  597.     .Width = Text1(0).Width
  598.     .Height = Text1(0).Height
  599.     .Top = Text1(0).Top
  600.     .Left = Text1(0).Left
  601. End With
  602. End Sub
  603. Private Sub UnloadTextBoxes(ByVal n As Node)
  604. 'Destroy all Textboxes in deleted node recursively
  605. If n.Tag > 0 Then Unload Text1(n.Tag)
  606. Set n = n.Child
  607. Do Until n Is Nothing
  608.     UnloadTextBoxes n
  609.     Set n = n.Next
  610. Loop
  611. End Sub
  612.  
  613. Private Sub ShowInstructions()
  614. Text1(0).Text = "To Add new Content, right click the Contents window." & vbCrLf & vbCrLf & _
  615.                 "To Add a subject to the Content right click the Contents Node." & vbCrLf & vbCrLf & _
  616.                 "To enter Help text, click the subject Node and start typing in the Description window" & vbCrLf & vbCrLf & _
  617.                 "When finished Composing the file, Click the save button"
  618. Text1(0).ZOrder vbBringToFront
  619. End Sub
  620.