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

📄 f_xtsz.frm

📁 易通汽车维修信息管理系统初期开发版本
💻 FRM
📖 第 1 页 / 共 2 页
字号:
      Left            =   120
      Top             =   6120
      _ExtentX        =   6588
      _ExtentY        =   1085
      ColorScheme     =   2
      Common_Dialog   =   0   'False
   End
   Begin VB.Line Line2 
      BorderColor     =   &H80000001&
      X1              =   120
      X2              =   6240
      Y1              =   2520
      Y2              =   2520
   End
   Begin VB.Line Line1 
      BorderColor     =   &H80000009&
      X1              =   120
      X2              =   6240
      Y1              =   2535
      Y2              =   2535
   End
   Begin VB.Label Label8 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "    税号"
      Height          =   180
      Left            =   2280
      TabIndex        =   19
      Top             =   2040
      Width           =   720
   End
   Begin VB.Label Label6 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "单位电话"
      Height          =   180
      Left            =   240
      TabIndex        =   18
      Top             =   2040
      Width           =   720
   End
   Begin VB.Label Label5 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "银行帐号"
      Height          =   180
      Left            =   240
      TabIndex        =   17
      Top             =   3780
      Width           =   720
   End
   Begin VB.Label Label4 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "帐户名称"
      Height          =   180
      Left            =   240
      TabIndex        =   16
      Top             =   3300
      Width           =   720
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "开户银行"
      Height          =   180
      Left            =   240
      TabIndex        =   15
      Top             =   2820
      Width           =   720
   End
   Begin VB.Label Label3 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "单位地址"
      Height          =   180
      Left            =   240
      TabIndex        =   14
      Top             =   1620
      Width           =   720
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "单位名称"
      Height          =   180
      Left            =   240
      TabIndex        =   13
      Top             =   1140
      Width           =   720
   End
   Begin VB.Line Line3 
      BorderColor     =   &H80000009&
      X1              =   120
      X2              =   6240
      Y1              =   4215
      Y2              =   4215
   End
   Begin VB.Line Line4 
      BorderColor     =   &H80000001&
      X1              =   120
      X2              =   6240
      Y1              =   4200
      Y2              =   4200
   End
   Begin VB.Line Line5 
      BorderColor     =   &H80000009&
      X1              =   120
      X2              =   6240
      Y1              =   5415
      Y2              =   5415
   End
   Begin VB.Line Line6 
      BorderColor     =   &H80000001&
      X1              =   120
      X2              =   6240
      Y1              =   5400
      Y2              =   5400
   End
End
Attribute VB_Name = "F_XTSZ"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub Command1_Click()
If Text1.Text = "" Or Text2.Text = "" Or Text3.Text = "" Or Text4.Text = "" Or Text5.Text = "" Or Text6.Text = "" Or Text7.Text = "" Then
    MsgBox "有信息未填写完整!", vbOKOnly + vbInformation
    Text1.SetFocus
    Text1.SelStart = 0
    Text1.SelLength = Len(Text1.Text)
    Command1.Enabled = False
    Exit Sub
Else
    If Command2.Enabled = False Then
        If Adodc1.Recordset.EOF = True Or Adodc1.Recordset.BOF = True Then '查看系统设置表里是否有记录
            Adodc1.Recordset.AddNew
        Else
            MsgBox "单位信息已经完成了初始化,需要修改单位信息请选择编辑。", vbOKOnly + vbInformation
            
            Text1.Text = ""
            Text2.Text = ""
            Text3.Text = ""
            Text4.Text = ""
            Text5.Text = ""
            Text6.Text = ""
            Text7.Text = ""
            
            Command3.SetFocus
            Command1.Enabled = False
            Exit Sub
        End If
    Else
        Adodc1.Recordset.UpdateBatch
    End If
    
    Adodc1.Recordset("单位名称") = Text1.Text
    Adodc1.Recordset("单位地址") = Text2.Text
    Adodc1.Recordset("单位电话") = Text3.Text
    Adodc1.Recordset("税号") = Text4.Text
    Adodc1.Recordset("开户银行") = Text5.Text
    Adodc1.Recordset("帐户名称") = Text6.Text
    Adodc1.Recordset("银行帐号") = Text7.Text
    Adodc1.Recordset.Update
    
    Text1.Text = ""
    Text2.Text = ""
    Text3.Text = ""
    Text4.Text = ""
    Text5.Text = ""
    Text6.Text = ""
    Text7.Text = ""
    
    MsgBox "单位信息初始化完成!", vbOKOnly + vbInformation
    Command1.Enabled = False
    Command2.Enabled = False
    Command3.SetFocus
End If
End Sub

Private Sub Command2_Click()
    Text1.Text = Adodc1.Recordset.Fields!单位名称
    Text2.Text = Adodc1.Recordset.Fields!单位地址
    Text3.Text = Adodc1.Recordset.Fields!单位电话
    Text4.Text = Adodc1.Recordset.Fields!税号
    Text5.Text = Adodc1.Recordset.Fields!开户银行
    Text6.Text = Adodc1.Recordset.Fields!帐户名称
    Text7.Text = Adodc1.Recordset.Fields!银行帐号
End Sub

Private Sub Command3_Click()
    If Text1.Text <> "" Or Text2.Text <> "" Or Text3.Text <> "" Or Text4.Text <> "" Or Text5.Text <> "" Or Text6.Text <> "" Or Text7.Text <> "" Then
        Command1.Enabled = False
        Command2.Enabled = False
        Text1.SetFocus
        Text1.Text = ""
        Text2.Text = ""
        Text3.Text = ""
        Text4.Text = ""
        Text5.Text = ""
        Text6.Text = ""
        Text7.Text = ""
    Else
        Unload Me
    End If
End Sub

Private Sub DataGrid1_Click()
    Command2.Enabled = True
    Text1.SetFocus
End Sub

Private Sub DataGrid1_DblClick()
    Command2_Click
End Sub

Private Sub Form_Load()
    WindowsXPC1.InitSubClassing
    
    Adodc1.ConnectionString = Conn
    Adodc1.RecordSource = "SELECT * FROM [系统设置]"
    Adodc1.Refresh

    Set DataGrid1.DataSource = Adodc1
End Sub

Private Sub Form_Activate()
    F_MAIN.StatusBar1.Panels(2).Text = "【当前活动窗口】" & Me.Caption
    Text1.SetFocus
End Sub

Private Sub Form_Unload(Cancel As Integer)
    F_MAIN.StatusBar1.Panels(2).Text = "目前没有窗口被激活..."
End Sub

Private Sub Text1_GotFocus()
    Text1.BackColor = &HC0FFC0
    Text2.BackColor = &HFFFFFF
    Text3.BackColor = &HFFFFFF
    Text4.BackColor = &HFFFFFF
    Text5.BackColor = &HFFFFFF
    Text6.BackColor = &HFFFFFF
    Text7.BackColor = &HFFFFFF
End Sub

Private Sub Text2_GotFocus()
    Text2.BackColor = &HC0FFC0
    Text1.BackColor = &HFFFFFF
    Text3.BackColor = &HFFFFFF
    Text4.BackColor = &HFFFFFF
    Text5.BackColor = &HFFFFFF
    Text6.BackColor = &HFFFFFF
    Text7.BackColor = &HFFFFFF
End Sub

Private Sub Text3_GotFocus()
    Text3.BackColor = &HC0FFC0
    Text2.BackColor = &HFFFFFF
    Text1.BackColor = &HFFFFFF
    Text4.BackColor = &HFFFFFF
    Text5.BackColor = &HFFFFFF
    Text6.BackColor = &HFFFFFF
    Text7.BackColor = &HFFFFFF
End Sub

Private Sub Text4_GotFocus()
    Text4.BackColor = &HC0FFC0
    Text2.BackColor = &HFFFFFF
    Text3.BackColor = &HFFFFFF
    Text1.BackColor = &HFFFFFF
    Text5.BackColor = &HFFFFFF
    Text6.BackColor = &HFFFFFF
    Text7.BackColor = &HFFFFFF
End Sub

Private Sub Text5_GotFocus()
    Text5.BackColor = &HC0FFC0
    Text2.BackColor = &HFFFFFF
    Text3.BackColor = &HFFFFFF
    Text4.BackColor = &HFFFFFF
    Text1.BackColor = &HFFFFFF
    Text6.BackColor = &HFFFFFF
    Text7.BackColor = &HFFFFFF
End Sub

Private Sub Text6_GotFocus()
    Text6.BackColor = &HC0FFC0
    Text2.BackColor = &HFFFFFF
    Text3.BackColor = &HFFFFFF
    Text4.BackColor = &HFFFFFF
    Text5.BackColor = &HFFFFFF
    Text1.BackColor = &HFFFFFF
    Text7.BackColor = &HFFFFFF
End Sub

Private Sub Text7_Change()
    Command1.Enabled = True
End Sub

Private Sub Text7_GotFocus()
    Text7.BackColor = &HC0FFC0
    Text2.BackColor = &HFFFFFF
    Text3.BackColor = &HFFFFFF
    Text4.BackColor = &HFFFFFF
    Text5.BackColor = &HFFFFFF
    Text6.BackColor = &HFFFFFF
    Text1.BackColor = &HFFFFFF
End Sub

Private Sub Command1_GotFocus()
    Text1.BackColor = &HFFFFFF
    Text2.BackColor = &HFFFFFF
    Text3.BackColor = &HFFFFFF
    Text4.BackColor = &HFFFFFF
    Text5.BackColor = &HFFFFFF
    Text6.BackColor = &HFFFFFF
    Text7.BackColor = &HFFFFFF
    
    Command1_Click
End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
    If KeyAscii = Asc(vbCr) Then Text2.SetFocus
End Sub

Private Sub Text2_KeyPress(KeyAscii As Integer)
    If KeyAscii = Asc(vbCr) Then Text3.SetFocus
End Sub

Private Sub Text3_KeyPress(KeyAscii As Integer)
    If KeyAscii = Asc(vbCr) Then Text4.SetFocus
End Sub

Private Sub Text4_KeyPress(KeyAscii As Integer)
    If KeyAscii = Asc(vbCr) Then Text5.SetFocus
End Sub

Private Sub Text5_KeyPress(KeyAscii As Integer)
    If KeyAscii = Asc(vbCr) Then Text6.SetFocus
End Sub

Private Sub Text6_KeyPress(KeyAscii As Integer)
    If KeyAscii = Asc(vbCr) Then Text7.SetFocus
End Sub

Private Sub Text7_KeyPress(KeyAscii As Integer)
    If KeyAscii = Asc(vbCr) Then
        Command1.Enabled = True
        Command1.SetFocus
    End If
End Sub

⌨️ 快捷键说明

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