home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic 4 Unleashed / Visual_Basic_4_Unleashed_SAMS_Publishing_1995.iso / source / chap35 / coinfo.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-09-11  |  8.6 KB  |  284 lines

  1. VERSION 4.00
  2. Begin VB.Form CoInfo 
  3.    Appearance      =   0  'Flat
  4.    BackColor       =   &H00C0C0C0&
  5.    Caption         =   "Company Information"
  6.    ClientHeight    =   5685
  7.    ClientLeft      =   690
  8.    ClientTop       =   1395
  9.    ClientWidth     =   7365
  10.    BeginProperty Font 
  11.       name            =   "MS Sans Serif"
  12.       charset         =   1
  13.       weight          =   700
  14.       size            =   8.25
  15.       underline       =   0   'False
  16.       italic          =   0   'False
  17.       strikethrough   =   0   'False
  18.    EndProperty
  19.    ForeColor       =   &H80000008&
  20.    Height          =   6090
  21.    KeyPreview      =   -1  'True
  22.    Left            =   630
  23.    LinkTopic       =   "Form1"
  24.    MaxButton       =   0   'False
  25.    MinButton       =   0   'False
  26.    ScaleHeight     =   5685
  27.    ScaleWidth      =   7365
  28.    Top             =   1050
  29.    Width           =   7485
  30.    Begin VB.TextBox txtCoName 
  31.       DataField       =   "CompanyName"
  32.       DataSource      =   "datCoInfo"
  33.       Height          =   285
  34.       Left            =   2520
  35.       TabIndex        =   1
  36.       Top             =   480
  37.       Width           =   3855
  38.    End
  39.    Begin VB.TextBox txtCoAddr1 
  40.       DataField       =   "Address1"
  41.       DataSource      =   "datCoInfo"
  42.       Height          =   285
  43.       Left            =   2520
  44.       TabIndex        =   2
  45.       Top             =   840
  46.       Width           =   3855
  47.    End
  48.    Begin VB.TextBox txtCoAddr2 
  49.       DataField       =   "Address2"
  50.       DataSource      =   "datCoInfo"
  51.       Height          =   285
  52.       Left            =   2520
  53.       TabIndex        =   3
  54.       Top             =   1200
  55.       Width           =   3855
  56.    End
  57.    Begin VB.TextBox txtCoCity 
  58.       DataField       =   "City"
  59.       DataSource      =   "datCoInfo"
  60.       Height          =   285
  61.       Left            =   2520
  62.       TabIndex        =   4
  63.       Top             =   1560
  64.       Width           =   1455
  65.    End
  66.    Begin VB.TextBox txtCoState 
  67.       DataField       =   "State"
  68.       DataSource      =   "datCoInfo"
  69.       Height          =   285
  70.       Left            =   2520
  71.       TabIndex        =   5
  72.       Top             =   1920
  73.       Width           =   1455
  74.    End
  75.    Begin VB.TextBox txtCoPhone 
  76.       DataField       =   "Phone"
  77.       DataSource      =   "datCoInfo"
  78.       Height          =   285
  79.       Left            =   2520
  80.       TabIndex        =   7
  81.       Top             =   3000
  82.       Width           =   1815
  83.    End
  84.    Begin VB.TextBox txtCoFax 
  85.       DataField       =   "FAX"
  86.       DataSource      =   "datCoInfo"
  87.       Height          =   285
  88.       Left            =   2520
  89.       TabIndex        =   8
  90.       Top             =   3360
  91.       Width           =   1815
  92.    End
  93.    Begin VB.TextBox txtCoSlogan 
  94.       DataField       =   "CompanySlogan"
  95.       DataSource      =   "datCoInfo"
  96.       Height          =   285
  97.       Left            =   1920
  98.       TabIndex        =   9
  99.       Top             =   4080
  100.       Width           =   4455
  101.    End
  102.    Begin VB.TextBox txtZip 
  103.       DataField       =   "Zip"
  104.       DataSource      =   "datCoInfo"
  105.       Height          =   285
  106.       Left            =   2520
  107.       TabIndex        =   6
  108.       Top             =   2280
  109.       Width           =   1455
  110.    End
  111.    Begin VB.Data datCoInfo 
  112.       Appearance      =   0  'Flat
  113.       Caption         =   "CoInfo"
  114.       Connect         =   ""
  115.       DatabaseName    =   "C:\VBPROJ\SAMS\VB4DB.MDB"
  116.       Exclusive       =   0   'False
  117.       Height          =   270
  118.       Left            =   240
  119.       Options         =   0
  120.       ReadOnly        =   0   'False
  121.       RecordsetType   =   1  'Dynaset
  122.       RecordSource    =   "CoInf"
  123.       Top             =   5145
  124.       Visible         =   0   'False
  125.       Width           =   2415
  126.    End
  127.    Begin VB.CommandButton Command1 
  128.       Appearance      =   0  'Flat
  129.       BackColor       =   &H80000005&
  130.       Caption         =   "&Close"
  131.       Height          =   615
  132.       Left            =   2880
  133.       TabIndex        =   0
  134.       TabStop         =   0   'False
  135.       Top             =   4920
  136.       Width           =   1335
  137.    End
  138.    Begin VB.Label Label9 
  139.       Alignment       =   1  'Right Justify
  140.       Appearance      =   0  'Flat
  141.       BackColor       =   &H00C0C0C0&
  142.       Caption         =   "Zip:"
  143.       ForeColor       =   &H80000008&
  144.       Height          =   255
  145.       Left            =   1680
  146.       TabIndex        =   18
  147.       Top             =   2280
  148.       Width           =   735
  149.    End
  150.    Begin VB.Label Label8 
  151.       Appearance      =   0  'Flat
  152.       BackColor       =   &H00C0C0C0&
  153.       Caption         =   "Company slogan:"
  154.       ForeColor       =   &H80000008&
  155.       Height          =   255
  156.       Left            =   360
  157.       TabIndex        =   17
  158.       Top             =   4080
  159.       Width           =   1575
  160.    End
  161.    Begin VB.Label Label7 
  162.       Alignment       =   1  'Right Justify
  163.       Appearance      =   0  'Flat
  164.       BackColor       =   &H00C0C0C0&
  165.       Caption         =   "FAX:"
  166.       ForeColor       =   &H80000008&
  167.       Height          =   255
  168.       Left            =   1200
  169.       TabIndex        =   16
  170.       Top             =   3360
  171.       Width           =   1215
  172.    End
  173.    Begin VB.Label Label6 
  174.       Alignment       =   1  'Right Justify
  175.       Appearance      =   0  'Flat
  176.       BackColor       =   &H00C0C0C0&
  177.       Caption         =   "Phone:"
  178.       ForeColor       =   &H80000008&
  179.       Height          =   255
  180.       Left            =   1200
  181.       TabIndex        =   15
  182.       Top             =   3000
  183.       Width           =   1215
  184.    End
  185.    Begin VB.Label Label5 
  186.       Alignment       =   1  'Right Justify
  187.       Appearance      =   0  'Flat
  188.       BackColor       =   &H00C0C0C0&
  189.       Caption         =   "State:"
  190.       ForeColor       =   &H80000008&
  191.       Height          =   255
  192.       Left            =   1800
  193.       TabIndex        =   14
  194.       Top             =   1920
  195.       Width           =   615
  196.    End
  197.    Begin VB.Label Label4 
  198.       Alignment       =   1  'Right Justify
  199.       Appearance      =   0  'Flat
  200.       BackColor       =   &H00C0C0C0&
  201.       Caption         =   "City:"
  202.       ForeColor       =   &H80000008&
  203.       Height          =   255
  204.       Left            =   1920
  205.       TabIndex        =   13
  206.       Top             =   1560
  207.       Width           =   495
  208.    End
  209.    Begin VB.Label Label3 
  210.       Alignment       =   1  'Right Justify
  211.       Appearance      =   0  'Flat
  212.       BackColor       =   &H00C0C0C0&
  213.       Caption         =   "Address line 2:"
  214.       ForeColor       =   &H80000008&
  215.       Height          =   255
  216.       Left            =   1080
  217.       TabIndex        =   12
  218.       Top             =   1200
  219.       Width           =   1335
  220.    End
  221.    Begin VB.Label Label2 
  222.       Alignment       =   1  'Right Justify
  223.       Appearance      =   0  'Flat
  224.       BackColor       =   &H00C0C0C0&
  225.       Caption         =   "Address line 1:"
  226.       ForeColor       =   &H80000008&
  227.       Height          =   255
  228.       Left            =   1080
  229.       TabIndex        =   11
  230.       Top             =   840
  231.       Width           =   1335
  232.    End
  233.    Begin VB.Label Label1 
  234.       Alignment       =   1  'Right Justify
  235.       Appearance      =   0  'Flat
  236.       BackColor       =   &H00C0C0C0&
  237.       Caption         =   "Company name:"
  238.       ForeColor       =   &H80000008&
  239.       Height          =   255
  240.       Left            =   960
  241.       TabIndex        =   10
  242.       Top             =   480
  243.       Width           =   1455
  244.    End
  245. Attribute VB_Name = "CoInfo"
  246. Attribute VB_Creatable = False
  247. Attribute VB_Exposed = False
  248. Private Sub btnAddCust_Click()
  249.     Unload CoInfo
  250. End Sub
  251. Private Sub Command1_Click()
  252.     Unload Me
  253. End Sub
  254. Private Sub Form_Activate()
  255. Dim SQLinq
  256.     ' Reset to the default  pointer when returning to this form.
  257.     MousePointer = 0
  258.     SQLinq = "SELECT * FROM COINF;"
  259.     datCoInfo.RecordSource = SQLinq
  260.     datCoInfo.Refresh
  261.     If datCoInfo.Recordset.RecordCount <> 0 Then
  262.         Exit Sub
  263.     Else
  264.         datCoInfo.Recordset.AddNew
  265.         datCoInfo.Recordset.Update
  266.     End If
  267. End Sub
  268. Private Sub Form_KeyPress(KeyAscii As Integer)
  269. ' While not a Windows standard, the client
  270. ' prefers to use the enter key to move from field to field.
  271. ' This subroutine should trap the keypress and
  272. ' and process all "ENTER" keys as "TAB"
  273.     If KeyAscii = 13 Then
  274.         SendKeys "{tab}"
  275.         KeyAscii = 0
  276.     End If
  277. End Sub
  278. Private Sub Form_Load()
  279.     'Center the form
  280.     Left = (Screen.Width - Width) / 2
  281.     Top = (Screen.Height - Height) / 2
  282.     datCoInfo.DatabaseName = Database_name
  283. End Sub
  284.