home *** CD-ROM | disk | FTP | other *** search
/ The Best of Select: Windows 95 Special 2 / WIN95_2.bin / utils / envelop / envelop.6 / Tools / Bootcamp / basic / dbconect / dbconect.eto < prev    next >
Encoding:
Text File  |  1996-07-08  |  4.1 KB  |  138 lines

  1. Type AddressForm From SampleMasterForm
  2.   Dim TextBox1 As New TextBox
  3.   Dim Label2 As New Label
  4.   Dim Label3 As New Label
  5.   Dim Label4 As New Label
  6.   Dim Label5 As New Label
  7.   Dim Label6 As New Label
  8.   Dim TextBox2 As New TextBox
  9.   Dim TextBox3 As New TextBox
  10.   Dim TextBox4 As New TextBox
  11.   Dim TextBox5 As New TextBox
  12.   Dim DataControl1 As New DataControl
  13.  
  14.   ' METHODS for object: AddressForm
  15.   Sub ResetApplication_Click()
  16.     ' connect the Data Control to the ASCII Data Source
  17.     DataControl1.RecordSet.Connect = SampleDir & "address.txt"
  18.   
  19.     DataControl1.RecordSet.MoveFirst
  20.   End Sub
  21.  
  22. End Type
  23.  
  24. Begin Code
  25. ' Reconstruction commands for object: AddressForm
  26. '
  27.   With AddressForm
  28.     .Caption := "Address Guide"
  29.     .Move(5235, 1845, 4620, 3120)
  30.     .SampleDir := "C:\envelop\bootcamp\basic\dbconect\"
  31.     .SampleName := "dbconect"
  32.     With .TextBox1
  33.       .DataSource := AddressForm.DataControl1.RecordSet
  34.       .DataField := "NAME"
  35.       .ZOrder := 1
  36.       .Move(1200, 75, 1950, 345)
  37.       .MaxLength := 15
  38.     End With  'AddressForm.TextBox1
  39.     With .Label2
  40.       .Caption := "Name:"
  41.       .ZOrder := 11
  42.       .Move(150, 75, 900, 345)
  43.       .Alignment := "Right"
  44.     End With  'AddressForm.Label2
  45.     With .Label3
  46.       .Caption := "Address:"
  47.       .ZOrder := 10
  48.       .Move(150, 525, 900, 345)
  49.       .Alignment := "Right"
  50.     End With  'AddressForm.Label3
  51.     With .Label4
  52.       .Caption := "City:"
  53.       .ZOrder := 9
  54.       .Move(150, 975, 900, 345)
  55.       .Alignment := "Right"
  56.     End With  'AddressForm.Label4
  57.     With .Label5
  58.       .Caption := "State:"
  59.       .ZOrder := 8
  60.       .Move(150, 1425, 900, 345)
  61.       .Alignment := "Right"
  62.     End With  'AddressForm.Label5
  63.     With .Label6
  64.       .Caption := "Zip:"
  65.       .ZOrder := 7
  66.       .Move(3000, 1440, 450, 345)
  67.       .Alignment := "Right"
  68.     End With  'AddressForm.Label6
  69.     With .TextBox2
  70.       .DataSource := AddressForm.DataControl1.RecordSet
  71.       .DataField := "ADDRESS"
  72.       .ZOrder := 2
  73.       .Move(1200, 525, 3150, 345)
  74.       .MaxLength := 25
  75.     End With  'AddressForm.TextBox2
  76.     With .TextBox3
  77.       .DataSource := AddressForm.DataControl1.RecordSet
  78.       .DataField := "CITY"
  79.       .ZOrder := 3
  80.       .Move(1200, 975, 1650, 345)
  81.       .MaxLength := 12
  82.     End With  'AddressForm.TextBox3
  83.     With .TextBox4
  84.       .DataSource := AddressForm.DataControl1.RecordSet
  85.       .DataField := "STATE"
  86.       .ZOrder := 4
  87.       .Move(1200, 1440, 1650, 345)
  88.       .MaxLength := 12
  89.     End With  'AddressForm.TextBox4
  90.     With .TextBox5
  91.       .DataSource := AddressForm.DataControl1.RecordSet
  92.       .DataField := "ZIP"
  93.       .ZOrder := 5
  94.       .Move(3600, 1440, 750, 345)
  95.       .MaxLength := 5
  96.     End With  'AddressForm.TextBox5
  97.     With .DataControl1
  98.       .Caption := "DataControl1"
  99.       .ZOrder := 6
  100.       .Move(150, 1950, 4200, 300)
  101.       .BorderStyle := "None"
  102.       .MinButton := True
  103.       .ControlBox := False
  104.       .Parent := AddressForm
  105.       .Visible := True
  106.       With .DataMoveFirst
  107.         .ZOrder := 1
  108.         .Move(0, 0, 525, 300)
  109.       End With  'AddressForm.DataControl1.DataMoveFirst
  110.       With .DataMovePrev
  111.         .ZOrder := 2
  112.         .Move(525, 0, 525, 300)
  113.       End With  'AddressForm.DataControl1.DataMovePrev
  114.       With .DataMoveNext
  115.         .ZOrder := 3
  116.         .Move(3150, 0, 525, 300)
  117.       End With  'AddressForm.DataControl1.DataMoveNext
  118.       With .DataMoveLast
  119.         .ZOrder := 4
  120.         .Move(3675, 0, 525, 300)
  121.       End With  'AddressForm.DataControl1.DataMoveLast
  122.       With .DataLabel
  123.         .ZOrder := 5
  124.         .Move(1050, 0, 2100, 300)
  125.       End With  'AddressForm.DataControl1.DataLabel
  126.       With .RecordSet
  127.         .DatabaseType := "FixedAscii"
  128.         .Database.FirstLineAsFieldNames := True
  129.         .Database.FieldWidthList := "15, 25, 12, 12, 5"
  130.         .Connect := "C:\envelop\bootcamp\basic\dbconect\address.txt"
  131.       End With  'AddressForm.DataControl1.RecordSet
  132.     End With  'AddressForm.DataControl1
  133.     With .helpfile
  134.       .FileName := "C:\envelop\bootcamp\basic\dbconect\dbconect.hlp"
  135.     End With  'AddressForm.helpfile
  136.   End With  'AddressForm
  137. End Code
  138.