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

📄 frmodbclogon.frm

📁 用Visual basic6开发的人事信息管理系统,数据库采用的是Sql Server2000
💻 FRM
字号:
VERSION 5.00
Object = "{0BA686C6-F7D3-101A-993E-0000C0EF6F5E}#1.0#0"; "THREED32.OCX"
Begin VB.Form frmODBCLogon 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "数据连接信息"
   ClientHeight    =   1980
   ClientLeft      =   2850
   ClientTop       =   1755
   ClientWidth     =   5625
   ControlBox      =   0   'False
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1980
   ScaleWidth      =   5625
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  '屏幕中心
   Begin VB.TextBox txtPWD 
      Appearance      =   0  'Flat
      Height          =   300
      IMEMode         =   3  'DISABLE
      Left            =   960
      PasswordChar    =   "*"
      TabIndex        =   8
      Top             =   0
      Visible         =   0   'False
      Width           =   3015
   End
   Begin VB.TextBox txtUID 
      Appearance      =   0  'Flat
      Height          =   300
      IMEMode         =   3  'DISABLE
      Left            =   990
      TabIndex        =   7
      Top             =   0
      Visible         =   0   'False
      Width           =   3015
   End
   Begin Threed.SSCommand cmdOK 
      Height          =   735
      Left            =   4440
      TabIndex        =   5
      Top             =   120
      Width           =   975
      _Version        =   65536
      _ExtentX        =   1720
      _ExtentY        =   1296
      _StockProps     =   78
      Caption         =   " 确 认(&A)"
      Font3D          =   1
      Picture         =   "frmODBCLogon.frx":0000
   End
   Begin VB.Frame fraStep3 
      Caption         =   "连接值"
      Height          =   1275
      Index           =   0
      Left            =   120
      TabIndex        =   4
      Top             =   240
      Width           =   4230
      Begin VB.TextBox txtDatabase 
         Appearance      =   0  'Flat
         Height          =   300
         IMEMode         =   3  'DISABLE
         Left            =   1125
         TabIndex        =   0
         Top             =   330
         Width           =   3015
      End
      Begin VB.TextBox txtServer 
         Appearance      =   0  'Flat
         Height          =   330
         IMEMode         =   3  'DISABLE
         Left            =   1125
         TabIndex        =   1
         Top             =   660
         Width           =   3015
      End
      Begin VB.Label lblStep3 
         AutoSize        =   -1  'True
         Caption         =   "数据库(&B):"
         Height          =   195
         Index           =   3
         Left            =   135
         TabIndex        =   2
         Top             =   390
         Width           =   840
      End
      Begin VB.Label lblStep3 
         AutoSize        =   -1  'True
         Caption         =   "服务器(&S):"
         Height          =   195
         Index           =   4
         Left            =   120
         TabIndex        =   3
         Top             =   720
         Width           =   855
      End
   End
   Begin Threed.SSCommand cmdCancel 
      Height          =   735
      Left            =   4440
      TabIndex        =   6
      Top             =   960
      Width           =   975
      _Version        =   65536
      _ExtentX        =   1720
      _ExtentY        =   1296
      _StockProps     =   78
      Caption         =   " 取 消(&Q)"
      Font3D          =   1
      Picture         =   "frmODBCLogon.frx":0452
   End
   Begin VB.Label lblStep3 
      AutoSize        =   -1  'True
      Caption         =   "密码(&P):"
      Height          =   195
      Index           =   2
      Left            =   120
      TabIndex        =   10
      Top             =   120
      Visible         =   0   'False
      Width           =   735
   End
   Begin VB.Label lblStep3 
      AutoSize        =   -1  'True
      Caption         =   "&UID:"
      Height          =   195
      Index           =   1
      Left            =   0
      TabIndex        =   9
      Top             =   30
      Visible         =   0   'False
      Width           =   330
   End
End
Attribute VB_Name = "frmODBCLogon"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub cmdCancel_Click()
    Unload Me
    Call Main
End Sub

Private Sub cmdOK_Click()

uConnect.UID = Trim(txtUID.Text)
uConnect.Pwd = Trim(txtPWD.Text)
uConnect.Server = Trim(txtServer.Text)
uConnect.DataBase = Trim(txtDatabase.Text)

Open App.Path & "\RS.dll" For Output As #1
Write #1, Trim(txtUID.Text)
Write #1, Trim(txtPWD.Text)
Write #1, Trim(txtServer.Text)
Write #1, Trim(txtDatabase.Text)
Close #1
Unload Me
Call Main
End Sub

Private Sub txtDatabase_GotFocus()
txtDatabase.SelStart = 0
txtDatabase.SelLength = Len(txtDatabase.Text)
End Sub

Private Sub txtDatabase_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then
    With Me.txtServer
        .SelStart = 0
        .SelLength = Len(.Text)
        .SetFocus
    End With
End If
End Sub

Private Sub txtDatabase_KeyUp(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyRight Then
    With Me.txtServer
        .SelStart = 0
        .SelLength = Len(.Text)
        .SetFocus
    End With
    If KeyCode = vbKeyLeft Then
        With Me.txtPWD
            .SelStart = 0
            .SelLength = Len(.Text)
            .SetFocus
        End With
    End If
End If
End Sub

Private Sub txtPWD_GotFocus()
txtPWD.SelStart = 0
txtPWD.SelLength = Len(txtPWD.Text)
End Sub

Private Sub txtPWD_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then
    With Me.txtDatabase
        .SelStart = 0
        .SelLength = Len(.Text)
        .SetFocus
    End With
End If
End Sub

Private Sub txtPWD_KeyUp(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyRight Then
    With Me.txtDatabase
        .SelStart = 0
        .SelLength = Len(.Text)
        .SetFocus
    End With
    If KeyCode = vbKeyLeft Then
        With Me.txtUID
            .SelStart = 0
            .SelLength = Len(.Text)
            .SetFocus
        End With
    End If
End If
End Sub

Private Sub txtServer_GotFocus()
txtServer.SelStart = 0
txtServer.SelLength = Len(txtServer.Text)
End Sub

Private Sub txtServer_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then
     Me.cmdOK.SetFocus
End If
End Sub

Private Sub txtServer_KeyUp(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyLeft Then
    With Me.txtDatabase
        .SelStart = 0
        .SelLength = Len(.Text)
        .SetFocus
    End With
    
End If
End Sub

Private Sub txtUID_GotFocus()
txtUID.SelStart = 0
txtUID.SelLength = Len(txtUID.Text)
End Sub

Private Sub txtUID_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then
    With Me.txtPWD
        .SelStart = 0
        .SelLength = Len(.Text)
        .SetFocus
    End With
    
End If
End Sub

Private Sub txtUID_KeyUp(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyRight Then
    With Me.txtPWD
        .SelStart = 0
        .SelLength = Len(.Text)
        .SetFocus
    End With
    
End If
End Sub

⌨️ 快捷键说明

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