home *** CD-ROM | disk | FTP | other *** search
- Type AddressForm From SampleMasterForm
- Dim TextBox1 As New TextBox
- Dim Label2 As New Label
- Dim Label3 As New Label
- Dim Label4 As New Label
- Dim Label5 As New Label
- Dim Label6 As New Label
- Dim TextBox2 As New TextBox
- Dim TextBox3 As New TextBox
- Dim TextBox4 As New TextBox
- Dim TextBox5 As New TextBox
- Dim DataControl1 As New DataControl
-
- ' METHODS for object: AddressForm
- Sub ResetApplication_Click()
- ' connect the Data Control to the ASCII Data Source
- DataControl1.RecordSet.Connect = SampleDir & "address.txt"
-
- DataControl1.RecordSet.MoveFirst
- End Sub
-
- End Type
-
- Begin Code
- ' Reconstruction commands for object: AddressForm
- '
- With AddressForm
- .Caption := "Address Guide"
- .Move(5235, 1845, 4620, 3120)
- .SampleDir := "C:\envelop\bootcamp\basic\dbconect\"
- .SampleName := "dbconect"
- With .TextBox1
- .DataSource := AddressForm.DataControl1.RecordSet
- .DataField := "NAME"
- .ZOrder := 1
- .Move(1200, 75, 1950, 345)
- .MaxLength := 15
- End With 'AddressForm.TextBox1
- With .Label2
- .Caption := "Name:"
- .ZOrder := 11
- .Move(150, 75, 900, 345)
- .Alignment := "Right"
- End With 'AddressForm.Label2
- With .Label3
- .Caption := "Address:"
- .ZOrder := 10
- .Move(150, 525, 900, 345)
- .Alignment := "Right"
- End With 'AddressForm.Label3
- With .Label4
- .Caption := "City:"
- .ZOrder := 9
- .Move(150, 975, 900, 345)
- .Alignment := "Right"
- End With 'AddressForm.Label4
- With .Label5
- .Caption := "State:"
- .ZOrder := 8
- .Move(150, 1425, 900, 345)
- .Alignment := "Right"
- End With 'AddressForm.Label5
- With .Label6
- .Caption := "Zip:"
- .ZOrder := 7
- .Move(3000, 1440, 450, 345)
- .Alignment := "Right"
- End With 'AddressForm.Label6
- With .TextBox2
- .DataSource := AddressForm.DataControl1.RecordSet
- .DataField := "ADDRESS"
- .ZOrder := 2
- .Move(1200, 525, 3150, 345)
- .MaxLength := 25
- End With 'AddressForm.TextBox2
- With .TextBox3
- .DataSource := AddressForm.DataControl1.RecordSet
- .DataField := "CITY"
- .ZOrder := 3
- .Move(1200, 975, 1650, 345)
- .MaxLength := 12
- End With 'AddressForm.TextBox3
- With .TextBox4
- .DataSource := AddressForm.DataControl1.RecordSet
- .DataField := "STATE"
- .ZOrder := 4
- .Move(1200, 1440, 1650, 345)
- .MaxLength := 12
- End With 'AddressForm.TextBox4
- With .TextBox5
- .DataSource := AddressForm.DataControl1.RecordSet
- .DataField := "ZIP"
- .ZOrder := 5
- .Move(3600, 1440, 750, 345)
- .MaxLength := 5
- End With 'AddressForm.TextBox5
- With .DataControl1
- .Caption := "DataControl1"
- .ZOrder := 6
- .Move(150, 1950, 4200, 300)
- .BorderStyle := "None"
- .MinButton := True
- .ControlBox := False
- .Parent := AddressForm
- .Visible := True
- With .DataMoveFirst
- .ZOrder := 1
- .Move(0, 0, 525, 300)
- End With 'AddressForm.DataControl1.DataMoveFirst
- With .DataMovePrev
- .ZOrder := 2
- .Move(525, 0, 525, 300)
- End With 'AddressForm.DataControl1.DataMovePrev
- With .DataMoveNext
- .ZOrder := 3
- .Move(3150, 0, 525, 300)
- End With 'AddressForm.DataControl1.DataMoveNext
- With .DataMoveLast
- .ZOrder := 4
- .Move(3675, 0, 525, 300)
- End With 'AddressForm.DataControl1.DataMoveLast
- With .DataLabel
- .ZOrder := 5
- .Move(1050, 0, 2100, 300)
- End With 'AddressForm.DataControl1.DataLabel
- With .RecordSet
- .DatabaseType := "FixedAscii"
- .Database.FirstLineAsFieldNames := True
- .Database.FieldWidthList := "15, 25, 12, 12, 5"
- .Connect := "C:\envelop\bootcamp\basic\dbconect\address.txt"
- End With 'AddressForm.DataControl1.RecordSet
- End With 'AddressForm.DataControl1
- With .helpfile
- .FileName := "C:\envelop\bootcamp\basic\dbconect\dbconect.hlp"
- End With 'AddressForm.helpfile
- End With 'AddressForm
- End Code
-