⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frm_gszl.frm

📁 VB物流管理系统毕业设计带源码源码+论文 vB+sql的毕业设计
💻 FRM
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form Frm_Gszl 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "公司资料设置"
   ClientHeight    =   3465
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   6930
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   ScaleHeight     =   3465
   ScaleWidth      =   6930
   StartUpPosition =   3  '窗口缺省
   Begin MSComctlLib.ImageList ImageList1 
      Left            =   5610
      Top             =   2295
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   26
      ImageHeight     =   26
      MaskColor       =   12632256
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
         NumListImages   =   3
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "Frm_Gszl.frx":0000
            Key             =   ""
         EndProperty
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "Frm_Gszl.frx":165A
            Key             =   ""
         EndProperty
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "Frm_Gszl.frx":2CB4
            Key             =   ""
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.Toolbar Tbr_Gsxx 
      Align           =   1  'Align Top
      Height          =   765
      Left            =   0
      TabIndex        =   1
      Top             =   0
      Width           =   6930
      _ExtentX        =   12224
      _ExtentY        =   1349
      ButtonWidth     =   1455
      ButtonHeight    =   1191
      Appearance      =   1
      ImageList       =   "ImageList1"
      _Version        =   393216
      BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
         NumButtons      =   3
         BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   " 编辑"
            ImageIndex      =   1
         EndProperty
         BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "  保存  "
            ImageIndex      =   2
         EndProperty
         BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "退出"
            ImageIndex      =   3
         EndProperty
      EndProperty
   End
   Begin VB.Frame Frame1 
      Caption         =   "公司基本信息"
      Height          =   2490
      Left            =   100
      TabIndex        =   0
      Top             =   870
      Width           =   6735
      Begin VB.TextBox Text1 
         Height          =   300
         Index           =   9
         Left            =   4080
         TabIndex        =   21
         Top             =   2040
         Width           =   2535
      End
      Begin VB.TextBox Text1 
         Height          =   300
         Index           =   8
         Left            =   1080
         TabIndex        =   18
         Top             =   2040
         Width           =   2055
      End
      Begin VB.TextBox Text1 
         Height          =   300
         Index           =   7
         Left            =   4080
         TabIndex        =   17
         Top             =   1605
         Width           =   2535
      End
      Begin VB.TextBox Text1 
         Height          =   300
         Index           =   6
         Left            =   1080
         TabIndex        =   16
         Top             =   1590
         Width           =   2055
      End
      Begin VB.TextBox Text1 
         Height          =   300
         Index           =   5
         Left            =   4080
         TabIndex        =   14
         Top             =   1150
         Width           =   2535
      End
      Begin VB.TextBox Text1 
         Height          =   300
         Index           =   4
         Left            =   1080
         TabIndex        =   12
         Top             =   1140
         Width           =   2055
      End
      Begin VB.TextBox Text1 
         Height          =   300
         Index           =   3
         Left            =   4080
         TabIndex        =   8
         Top             =   695
         Width           =   2535
      End
      Begin VB.TextBox Text1 
         Height          =   300
         Index           =   2
         Left            =   1080
         TabIndex        =   7
         Top             =   690
         Width           =   2055
      End
      Begin VB.TextBox Text1 
         Height          =   300
         Index           =   1
         Left            =   4080
         TabIndex        =   5
         Top             =   240
         Width           =   2535
      End
      Begin VB.TextBox Text1 
         Height          =   300
         Index           =   0
         Left            =   1080
         TabIndex        =   3
         Top             =   240
         Width           =   2055
      End
      Begin VB.Label Label9 
         Caption         =   "纳税号"
         Height          =   270
         Left            =   3255
         TabIndex        =   20
         Top             =   2100
         Width           =   840
      End
      Begin VB.Label Label8 
         Caption         =   "邮政编码"
         Height          =   285
         Left            =   105
         TabIndex        =   19
         Top             =   795
         Width           =   765
      End
      Begin VB.Label Label7 
         Caption         =   "公司网址"
         Height          =   255
         Left            =   105
         TabIndex        =   15
         Top             =   2130
         Width           =   735
      End
      Begin VB.Label Label6 
         Caption         =   "法人代表"
         Height          =   255
         Left            =   105
         TabIndex        =   13
         Top             =   1680
         Width           =   975
      End
      Begin VB.Label Label5 
         Caption         =   "银行账号"
         Height          =   255
         Left            =   3240
         TabIndex        =   11
         Top             =   1230
         Width           =   855
      End
      Begin VB.Label Label4 
         Caption         =   "联系电话"
         Height          =   255
         Left            =   3225
         TabIndex        =   10
         Top             =   1665
         Width           =   975
      End
      Begin VB.Label Label3 
         Caption         =   "传真"
         Height          =   255
         Left            =   3240
         TabIndex        =   9
         Top             =   780
         Width           =   855
      End
      Begin VB.Label Label2 
         Caption         =   "开户银行"
         Height          =   375
         Left            =   105
         TabIndex        =   6
         Top             =   1230
         Width           =   855
      End
      Begin VB.Label Label1 
         Caption         =   "公司地址"
         Height          =   255
         Index           =   1
         Left            =   3240
         TabIndex        =   4
         Top             =   360
         Width           =   855
      End
      Begin VB.Label Label1 
         Caption         =   "公司名称"
         Height          =   255
         Index           =   0
         Left            =   105
         TabIndex        =   2
         Top             =   360
         Width           =   855
      End
   End
End
Attribute VB_Name = "Frm_Gszl"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim i As Integer
Dim c
Private Sub Form_Load()
   Me.Left = (Screen.Width - Me.Width) / 2
   Me.Top = (Screen.Height - Me.Height) / 2
   Call LoadFile                       '窗体启动的时候加载数据
   Call LTbrControl                    '控制工具栏按钮的状态
   For i = 0 To 9
      Text1(i).Locked = True
   Next i
End Sub

Private Sub Tbr_Gsxx_ButtonClick(ByVal Button As MSComctlLib.Button)
  Select Case Button.Index
     Case 1
         For i = 0 To 9
            Text1(i).Locked = False
            Text1(0).SetFocus
         Next i
       Call CTbrControl
     Case 2                 '保存信息
          AdoRs.Open "select * from tb_bdwxx", Cnn, adOpenKeyset
             If AdoRs.RecordCount > 0 Then
                Call Edits                 '调用编辑事件过程
             Else
                Call Saves                 '调用保存事件过程
             End If
       Call LTbrControl
     Case 3
        Unload Me
  End Select
End Sub

Private Sub Text1_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer)
   On Error Resume Next
   If KeyCode = 13 Then
      If Index >= 0 Then Text1(Index + 1).SetFocus
      If Index = 9 Then
          AdoRs.Open "select * from tb_bdwxx", Cnn, adOpenKeyset
          If AdoRs.RecordCount > 0 Then
             Call Edits
          Else
             Call Saves
          End If
      End If
   End If
   If Index >= 0 And KeyCode = 40 Then Text1(Index + 1).SetFocus
   If Index <= 9 And KeyCode = 38 Then Text1(Index - 1).SetFocus
End Sub
Private Sub Saves()     '保存信息的事件过程
    c = MsgBox("确认保存信息吗", 33, "提示信息")
      If c = vbOK Then
        Set AdoRs = Cnn.Execute("insert into tb_bdwxx values('" & Text1(0) & "','" & Text1(1) & "','" & Text1(2) & "','" & Text1(3) & "','" & Text1(6) & "','" & Text1(7) & "','" & Text1(4) & "','" & Text1(5) & "','" & Text1(8) & "','" & Text1(9) & "')")
        MsgBox "数据保存成功", 64, "提示信息"
    Else
       AdoRs.Close
    End If
End Sub

Private Sub Edits()     '修改信息的事件过程
    c = MsgBox("确认保存信息吗", 33, "提示信息")
      If c = vbOK Then
        Set AdoRs = Cnn.Execute("UPDATE tb_bdwxx SET bdwxx_mc='" + Text1(0) _
        + "',bdwxx_lxdz='" + Text1(1) + "',bdwxx_yb='" + Text1(2) + "',bdwxx_cz='" _
        + Text1(3) + "',bdwxx_khyh='" + Text1(4) + "',bdwxx_yhzh='" _
        + Text1(5) + "',bdwxx_frdb='" + Text1(6) + "',bdwxx_lxdh='" + Text1(7) _
        + "',bdwxx_wz='" + Text1(8) + "',bdwxx_nsh='" + Text1(9) + "'")
        MsgBox "数据保存成功", 64, "提示信息"
    Else
      AdoRs.Close
    End If
End Sub
Private Sub LoadFile()
   AdoRs.Open "select * from tb_bdwxx", Cnn, adOpenKeyset
     If AdoRs.RecordCount > 0 Then
        Text1(0).Text = AdoRs.Fields("bdwxx_mc")
        Text1(1).Text = AdoRs.Fields("bdwxx_lxdz")
        Text1(2).Text = AdoRs.Fields("bdwxx_yb")
        Text1(3).Text = AdoRs.Fields("bdwxx_cz")
        Text1(6).Text = AdoRs.Fields("bdwxx_frdb")
        Text1(7).Text = AdoRs.Fields("bdwxx_lxdh")
        Text1(4).Text = AdoRs.Fields("bdwxx_khyh")
        Text1(5).Text = AdoRs.Fields("bdwxx_yhzh")
        Text1(8).Text = AdoRs.Fields("bdwxx_wz")
        Text1(9).Text = AdoRs.Fields("bdwxx_nsh")
      End If
   AdoRs.Close
End Sub

Private Sub LTbrControl()                '控制窗体加载时工具栏按钮的状态
   Tbr_Gsxx.Buttons(1).Enabled = True
   Tbr_Gsxx.Buttons(2).Enabled = False
   Tbr_Gsxx.Buttons(3).Enabled = True
End Sub
Private Sub CTbrControl()                '单击编辑按钮时控制工具栏按钮的状态
   Tbr_Gsxx.Buttons(1).Enabled = False
   Tbr_Gsxx.Buttons(2).Enabled = True
   Tbr_Gsxx.Buttons(3).Enabled = True
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -