home *** CD-ROM | disk | FTP | other *** search
- Type ProtoForm From Form
- Dim BtnShowNext As New Button
- Dim BtnShowPrev As New Button
- Dim Label1 As New Label
- Dim Label3 As New Label
- Dim LblCurrentPageNumber As New Label
- Dim Label5 As New Label
- Dim LblLastPageNumber As New Label
-
- ' METHODS for object: ProtoForm
- Sub BtnShowNext_Click()
- FormGroup.ShowNext(Me)
- End Sub
-
- Sub BtnShowPrev_Click()
- FormGroup.ShowPrev(Me)
- End Sub
-
- Sub DisplayForm (cur_page As Integer, last_page As Long)
- LblCurrentPageNumber.Caption = cur_page
- LblLastPageNumber.Caption = last_page
- Show
- End Sub
-
- End Type
-
- Type NonVisualComponentForm From SampleMasterForm
- Dim BtnRunDemo As New Button
- Dim Label1 As New Label
- Dim Label2 As New Label
- Dim Label3 As New Label
-
- ' METHODS for object: NonVisualComponentForm
- Sub BtnRunDemo_Click()
- Form11.Load
- End Sub
-
- Sub ResetApplication_Click
- Dim i As Integer
- Dim o As Object
- For i = 0 To FormGroup.Count - 1
- o = FormGroup(i)
- If o.Visible Then o.Hide
- Next i
- End Sub
-
- Sub ExitApplication_Click ()
- helpfile.Quit
- ResetApplication_Click
- Hide
- End Sub
-
- End Type
-
- Type FormGroup From Group
-
- ' METHODS for object: FormGroup
- Sub ShowPrev(current_form as Form)
- Dim i,j as Integer
- Dim prev_form as Form
-
- For i = 0 To Count - 1
- If ObjectAt(i) == current_form Then
- If i == 0 Then
- j = Count - 1
- Else
- j = i - 1
- End If
- prev_form = ObjectAt(j)
- Exit For
- End If
- Next i
-
- If prev_form Then
- Dim form_top, form_left As Integer
- form_top = current_form.Top
- form_left = current_form.Left
- prev_form.Caption = "Group Number: " & j
- If (prev_form.Left <> form_left) || (prev_form.Top <> form_top) Then
- prev_form.Move form_left, form_top, prev_form.Width, prev_form.Height
- End If
- prev_form.DisplayForm(j + 1, Count)
- current_form.Hide
- End If
-
- End Sub
-
- Sub ShowNext(current_form as Form)
- Dim i,j as Integer
- Dim next_form as Form
-
- For i = 0 To Count - 1
- If ObjectAt(i) == current_form Then
- If i == Count - 1 Then
- j = 0
- Else
- j = i + 1
- End If
- next_form = ObjectAt(j)
- Exit For
- End If
- Next i
-
- If next_form Then
- Dim form_top, form_left As Integer
- form_top = current_form.Top
- form_left = current_form.Left
- next_form.Caption = "Group Number: " & j
- If (next_form.Left <> form_left) || (next_form.Top <> form_top) Then
- next_form.Move form_left, form_top, next_form.Width, next_form.Height
- End If
- next_form.DisplayForm(j + 1, Count)
- current_form.Hide
- End If
-
- End Sub
-
- End Type
-
- Type Form11 From ProtoForm
- Dim Label2 As New Label
- Dim Button1 As New Button
- Dim Button2 As New Button
-
- ' METHODS for object: Form11
- Sub Load
-
- ' Need to clear the group list
- FormGroup.Clear
-
- ' Need to build a list of form objects in the group
- FormGroup.Append(Form11)
- FormGroup.Append(Form12)
- FormGroup.Append(Form13)
- FormGroup.Append(Form14)
- FormGroup.Append(Form15)
- FormGroup.Append(Form16)
- FormGroup.Append(Form17)
- Show
- End Sub
-
- End Type
-
- Type Form12 From ProtoForm
- Dim Label2 As New Label
- Dim OptionButton1 As New OptionButton
- Dim OptionButton2 As New OptionButton
- Dim OptionButton3 As New OptionButton
- End Type
-
- Type Form13 From ProtoForm
- Dim Label2 As New Label
- Dim CheckBox1 As New CheckBox
- Dim CheckBox2 As New CheckBox
- Dim CheckBox3 As New CheckBox
- End Type
-
- Type Form14 From ProtoForm
- Dim Label2 As New Label
- Dim TextBox1 As New TextBox
- Dim TextBox2 As New TextBox
- End Type
-
- Type Form15 From ProtoForm
- Dim Label2 As New Label
- Dim ComboBox1 As New ComboBox
- Dim ComboBox2 As New ComboBox
- End Type
-
- Type Form16 From ProtoForm
- Dim Label2 As New Label
- Dim ScrollBar1 As New ScrollBar
- Dim ScrollBar2 As New ScrollBar
- End Type
-
- Type Form17 From ProtoForm
- Dim Label2 As New Label
- Dim Frame1 As New Frame
- Dim Gauge1 As New Gauge
- Dim Gauge2 As New Gauge
- End Type
-
- Begin Code
- ' Reconstruction commands for object: ProtoForm
- '
- With ProtoForm
- .Caption := "0"
- .Move(6150, 1860, 3600, 4320)
- With .BtnShowNext
- .Caption := "Next"
- .Move(2100, 3300, 1200, 450)
- End With 'ProtoForm.BtnShowNext
- With .BtnShowPrev
- .Caption := "Prev"
- .Move(150, 3300, 1200, 450)
- End With 'ProtoForm.BtnShowPrev
- With .Label1
- .Caption := "Envelop Paging Example"
- .ForeColor := 16711680
- .Move(300, 150, 2850, 300)
- .Alignment := "Center"
- End With 'ProtoForm.Label1
- With .Label3
- .Caption := "Page"
- .Move(900, 2850, 600, 300)
- End With 'ProtoForm.Label3
- With .LblCurrentPageNumber
- .ForeColor := 255
- .Move(1500, 2850, 300, 300)
- .Alignment := "Center"
- End With 'ProtoForm.LblCurrentPageNumber
- With .Label5
- .Caption := "of"
- .Move(1800, 2850, 300, 300)
- End With 'ProtoForm.Label5
- With .LblLastPageNumber
- .ForeColor := 255
- .Move(2100, 2850, 300, 300)
- .Alignment := "Center"
- End With 'ProtoForm.LblLastPageNumber
- End With 'ProtoForm
- ' Reconstruction commands for object: NonVisualComponentForm
- '
- With NonVisualComponentForm
- .Caption := "Non-Visual Component"
- .Move(3990, 1830, 5265, 4455)
- .SampleDir := "C:\envelop\bootcamp\concepts\novisual\"
- .SampleName := "novisual"
- With .BtnRunDemo
- .Caption := "Run Demo"
- .Move(1050, 3000, 2850, 450)
- End With 'NonVisualComponentForm.BtnRunDemo
- With .Label1
- .Caption := "1. Click Run Demo button to display first form."
- .ForeColor := 16711680
- .Move(300, 300, 4650, 300)
- End With 'NonVisualComponentForm.Label1
- With .Label2
- .Caption := "2. Click Next button to display next form."
- .ForeColor := 16711680
- .Move(300, 900, 4650, 300)
- End With 'NonVisualComponentForm.Label2
- With .Label3
- .Caption := "3. Click Prev button to display previous form."
- .ForeColor := 16711680
- .Move(300, 1500, 4650, 300)
- End With 'NonVisualComponentForm.Label3
- With .helpfile
- .FileName := "C:\envelop\bootcamp\concepts\novisual\novisual.hlp"
- End With 'NonVisualComponentForm.helpfile
- End With 'NonVisualComponentForm
- ' Reconstruction commands for object: FormGroup
- '
- With FormGroup
- End With 'FormGroup
- ' Reconstruction commands for object: Form11
- '
- With Form11
- .Caption := "Group Number: 0"
- .Move(6015, 2100, 3600, 4320)
- With .Label2
- .Caption := "This is Form11."
- .Move(300, 900, 1650, 300)
- End With 'Form11.Label2
- With .Button1
- .Caption := "Button1"
- .Move(750, 1350, 1800, 450)
- End With 'Form11.Button1
- With .Button2
- .Caption := "Button2"
- .Move(750, 1950, 1800, 450)
- End With 'Form11.Button2
- With .BtnShowNext
- .Caption := "Next"
- .Move(2100, 3300, 1200, 450)
- End With 'Form11.BtnShowNext
- With .BtnShowPrev
- .Caption := "Prev"
- .Move(150, 3300, 1200, 450)
- End With 'Form11.BtnShowPrev
- With .Label1
- .Caption := "Envelop Paging Example"
- .ForeColor := 16711680
- .Move(300, 150, 2850, 300)
- .Alignment := "Center"
- End With 'Form11.Label1
- With .Label3
- .Caption := "Page"
- .Move(900, 2850, 600, 300)
- End With 'Form11.Label3
- With .LblCurrentPageNumber
- .Caption := "1"
- .ForeColor := 255
- .Move(1500, 2850, 300, 300)
- .Alignment := "Center"
- End With 'Form11.LblCurrentPageNumber
- With .Label5
- .Caption := "of"
- .Move(1800, 2850, 300, 300)
- End With 'Form11.Label5
- With .LblLastPageNumber
- .Caption := "7"
- .ForeColor := 255
- .Move(2100, 2850, 300, 300)
- .Alignment := "Center"
- End With 'Form11.LblLastPageNumber
- End With 'Form11
- ' Reconstruction commands for object: Form12
- '
- With Form12
- .Caption := "Group Number: 1"
- .Move(6015, 2100, 3600, 4320)
- With .Label2
- .Caption := "This is Form12."
- .Move(300, 900, 2100, 300)
- End With 'Form12.Label2
- With .OptionButton1
- .Caption := "OptionButton1"
- .Move(750, 1350, 1950, 300)
- End With 'Form12.OptionButton1
- With .OptionButton2
- .Caption := "OptionButton2"
- .Move(750, 1800, 1950, 300)
- End With 'Form12.OptionButton2
- With .OptionButton3
- .Caption := "OptionButton3"
- .Move(750, 2250, 1950, 300)
- End With 'Form12.OptionButton3
- With .BtnShowNext
- .Caption := "Next"
- .Move(2100, 3300, 1200, 450)
- End With 'Form12.BtnShowNext
- With .BtnShowPrev
- .Caption := "Prev"
- .Move(150, 3300, 1200, 450)
- End With 'Form12.BtnShowPrev
- With .Label1
- .Caption := "Envelop Paging Example"
- .ForeColor := 16711680
- .Move(300, 150, 2850, 300)
- .Alignment := "Center"
- End With 'Form12.Label1
- With .Label3
- .Caption := "Page"
- .Move(900, 2850, 600, 300)
- End With 'Form12.Label3
- With .LblCurrentPageNumber
- .Caption := "2"
- .ForeColor := 255
- .Move(1500, 2850, 300, 300)
- .Alignment := "Center"
- End With 'Form12.LblCurrentPageNumber
- With .Label5
- .Caption := "of"
- .Move(1800, 2850, 300, 300)
- End With 'Form12.Label5
- With .LblLastPageNumber
- .Caption := "7"
- .ForeColor := 255
- .Move(2100, 2850, 300, 300)
- .Alignment := "Center"
- End With 'Form12.LblLastPageNumber
- End With 'Form12
- ' Reconstruction commands for object: Form13
- '
- With Form13
- .Caption := "Group Number: 2"
- .Move(6015, 2100, 3600, 4320)
- With .Label2
- .Caption := "This is Form13."
- .Move(300, 900, 2100, 300)
- End With 'Form13.Label2
- With .CheckBox1
- .Caption := "CheckBox1"
- .Move(900, 1350, 1650, 300)
- End With 'Form13.CheckBox1
- With .CheckBox2
- .Caption := "CheckBox2"
- .Move(900, 1800, 1650, 300)
- End With 'Form13.CheckBox2
- With .CheckBox3
- .Caption := "CheckBox3"
- .Move(900, 2250, 1650, 300)
- End With 'Form13.CheckBox3
- With .BtnShowNext
- .Caption := "Next"
- .Move(2100, 3300, 1200, 450)
- End With 'Form13.BtnShowNext
- With .BtnShowPrev
- .Caption := "Prev"
- .Move(150, 3300, 1200, 450)
- End With 'Form13.BtnShowPrev
- With .Label1
- .Caption := "Envelop Paging Example"
- .ForeColor := 16711680
- .Move(300, 150, 2850, 300)
- .Alignment := "Center"
- End With 'Form13.Label1
- With .Label3
- .Caption := "Page"
- .Move(900, 2850, 600, 300)
- End With 'Form13.Label3
- With .LblCurrentPageNumber
- .Caption := "3"
- .ForeColor := 255
- .Move(1500, 2850, 300, 300)
- .Alignment := "Center"
- End With 'Form13.LblCurrentPageNumber
- With .Label5
- .Caption := "of"
- .Move(1800, 2850, 300, 300)
- End With 'Form13.Label5
- With .LblLastPageNumber
- .Caption := "7"
- .ForeColor := 255
- .Move(2100, 2850, 300, 300)
- .Alignment := "Center"
- End With 'Form13.LblLastPageNumber
- End With 'Form13
- ' Reconstruction commands for object: Form14
- '
- With Form14
- .Caption := "Group Number: 3"
- .Move(6015, 2100, 3600, 4320)
- With .Label2
- .Caption := "This is Form14."
- .Move(300, 900, 2100, 300)
- End With 'Form14.Label2
- With .TextBox1
- .Caption := "TextBox1"
- .Move(450, 1350, 2550, 450)
- End With 'Form14.TextBox1
- With .TextBox2
- .Caption := "TextBox2"
- .Move(450, 1950, 2550, 450)
- End With 'Form14.TextBox2
- With .BtnShowNext
- .Caption := "Next"
- .Move(2100, 3300, 1200, 450)
- End With 'Form14.BtnShowNext
- With .BtnShowPrev
- .Caption := "Prev"
- .Move(150, 3300, 1200, 450)
- End With 'Form14.BtnShowPrev
- With .Label1
- .Caption := "Envelop Paging Example"
- .ForeColor := 16711680
- .Move(300, 150, 2850, 300)
- .Alignment := "Center"
- End With 'Form14.Label1
- With .Label3
- .Caption := "Page"
- .Move(900, 2850, 600, 300)
- End With 'Form14.Label3
- With .LblCurrentPageNumber
- .Caption := "4"
- .ForeColor := 255
- .Move(1500, 2850, 300, 300)
- .Alignment := "Center"
- End With 'Form14.LblCurrentPageNumber
- With .Label5
- .Caption := "of"
- .Move(1800, 2850, 300, 300)
- End With 'Form14.Label5
- With .LblLastPageNumber
- .Caption := "7"
- .ForeColor := 255
- .Move(2100, 2850, 300, 300)
- .Alignment := "Center"
- End With 'Form14.LblLastPageNumber
- End With 'Form14
- ' Reconstruction commands for object: Form15
- '
- With Form15
- .Caption := "Group Number: 4"
- .Move(6015, 2100, 3600, 4320)
- With .Label2
- .Caption := "This is Form15."
- .Move(300, 900, 1800, 300)
- End With 'Form15.Label2
- With .ComboBox1
- .Move(300, 1350, 2850, 360)
- End With 'Form15.ComboBox1
- With .ComboBox2
- .Move(300, 1950, 2850, 360)
- End With 'Form15.ComboBox2
- With .BtnShowNext
- .Caption := "Next"
- .Move(2100, 3300, 1200, 450)
- End With 'Form15.BtnShowNext
- With .BtnShowPrev
- .Caption := "Prev"
- .Move(150, 3300, 1200, 450)
- End With 'Form15.BtnShowPrev
- With .Label1
- .Caption := "Envelop Paging Example"
- .ForeColor := 16711680
- .Move(300, 150, 2850, 300)
- .Alignment := "Center"
- End With 'Form15.Label1
- With .Label3
- .Caption := "Page"
- .Move(900, 2850, 600, 300)
- End With 'Form15.Label3
- With .LblCurrentPageNumber
- .Caption := "5"
- .ForeColor := 255
- .Move(1500, 2850, 300, 300)
- .Alignment := "Center"
- End With 'Form15.LblCurrentPageNumber
- With .Label5
- .Caption := "of"
- .Move(1800, 2850, 300, 300)
- End With 'Form15.Label5
- With .LblLastPageNumber
- .Caption := "7"
- .ForeColor := 255
- .Move(2100, 2850, 300, 300)
- .Alignment := "Center"
- End With 'Form15.LblLastPageNumber
- End With 'Form15
- ' Reconstruction commands for object: Form16
- '
- With Form16
- .Caption := "Group Number: 5"
- .Move(6015, 2100, 3600, 4320)
- With .Label2
- .Caption := "This is Form16."
- .Move(300, 900, 2100, 300)
- End With 'Form16.Label2
- With .ScrollBar1
- .Caption := "ScrollBar1"
- .Move(300, 1500, 2835, 300)
- .Orientation := "Horizontal"
- .Move(300, 1500, 2835, 300)
- End With 'Form16.ScrollBar1
- With .ScrollBar2
- .Caption := "ScrollBar2"
- .Move(300, 1950, 2835, 300)
- .Orientation := "Horizontal"
- .Move(300, 1950, 2835, 300)
- End With 'Form16.ScrollBar2
- With .BtnShowNext
- .Caption := "Next"
- .Move(2100, 3300, 1200, 450)
- End With 'Form16.BtnShowNext
- With .BtnShowPrev
- .Caption := "Prev"
- .Move(150, 3300, 1200, 450)
- End With 'Form16.BtnShowPrev
- With .Label1
- .Caption := "Envelop Paging Example"
- .ForeColor := 16711680
- .Move(300, 150, 2850, 300)
- .Alignment := "Center"
- End With 'Form16.Label1
- With .Label3
- .Caption := "Page"
- .Move(900, 2850, 600, 300)
- End With 'Form16.Label3
- With .LblCurrentPageNumber
- .Caption := "6"
- .ForeColor := 255
- .Move(1500, 2850, 300, 300)
- .Alignment := "Center"
- End With 'Form16.LblCurrentPageNumber
- With .Label5
- .Caption := "of"
- .Move(1800, 2850, 300, 300)
- End With 'Form16.Label5
- With .LblLastPageNumber
- .Caption := "7"
- .ForeColor := 255
- .Move(2100, 2850, 300, 300)
- .Alignment := "Center"
- End With 'Form16.LblLastPageNumber
- End With 'Form16
- ' Reconstruction commands for object: Form17
- '
- With Form17
- .Caption := "Group Number: 6"
- .Move(6015, 2100, 3600, 4320)
- With .Label2
- .Caption := "This is Form17."
- .Move(300, 900, 2100, 300)
- End With 'Form17.Label2
- With .Frame1
- .Caption := "Frame1"
- .Move(300, 1350, 2850, 1200)
- End With 'Form17.Frame1
- With .Gauge1
- .Caption := "Gauge1"
- .Move(2100, 1650, 900, 750)
- .Orientation := "Vertical"
- .Move(2100, 1650, 900, 750)
- End With 'Form17.Gauge1
- With .Gauge2
- .Caption := "Gauge2"
- .Move(1050, 1800, 900, 600)
- End With 'Form17.Gauge2
- With .BtnShowNext
- .Caption := "Next"
- .Move(2100, 3300, 1200, 450)
- End With 'Form17.BtnShowNext
- With .BtnShowPrev
- .Caption := "Prev"
- .Move(150, 3300, 1200, 450)
- End With 'Form17.BtnShowPrev
- With .Label1
- .Caption := "Envelop Paging Example"
- .ForeColor := 16711680
- .Move(300, 150, 2850, 300)
- .Alignment := "Center"
- End With 'Form17.Label1
- With .Label3
- .Caption := "Page"
- .Move(900, 2850, 600, 300)
- End With 'Form17.Label3
- With .LblCurrentPageNumber
- .Caption := "7"
- .ForeColor := 255
- .Move(1500, 2850, 300, 300)
- .Alignment := "Center"
- End With 'Form17.LblCurrentPageNumber
- With .Label5
- .Caption := "of"
- .Move(1800, 2850, 300, 300)
- End With 'Form17.Label5
- With .LblLastPageNumber
- .Caption := "7"
- .ForeColor := 255
- .Move(2100, 2850, 300, 300)
- .Alignment := "Center"
- End With 'Form17.LblLastPageNumber
- End With 'Form17
- End Code
-