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

📄 frmselserver.frm

📁 人事管理系统的一个比较不错的VB软件 有管理系统的功能
💻 FRM
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Begin VB.Form frmSelServer 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "服务器设置"
   ClientHeight    =   4455
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   3330
   Icon            =   "frmSelServer.frx":0000
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4455
   ScaleWidth      =   3330
   StartUpPosition =   3  '窗口缺省
   Begin VB.Frame Frame1 
      Height          =   2175
      Left            =   120
      TabIndex        =   6
      Top             =   1020
      Width           =   3015
      Begin VB.TextBox txtDataBaseName 
         Height          =   375
         Left            =   1200
         MaxLength       =   20
         TabIndex        =   1
         Top             =   720
         Width           =   1575
      End
      Begin VB.TextBox txtServerName 
         Height          =   375
         Left            =   1200
         MaxLength       =   20
         TabIndex        =   0
         Top             =   240
         Width           =   1575
      End
      Begin VB.TextBox txtCount 
         Height          =   375
         Left            =   1200
         MaxLength       =   20
         TabIndex        =   2
         Top             =   1200
         Width           =   1575
      End
      Begin VB.TextBox txtPassword 
         Height          =   375
         IMEMode         =   3  'DISABLE
         Left            =   1200
         MaxLength       =   12
         PasswordChar    =   "*"
         TabIndex        =   3
         Top             =   1680
         Width           =   1575
      End
      Begin VB.Label Label7 
         AutoSize        =   -1  'True
         Caption         =   "数据库名称:"
         Height          =   180
         Left            =   120
         TabIndex        =   10
         Top             =   840
         Width           =   1080
      End
      Begin VB.Label Label4 
         AutoSize        =   -1  'True
         Caption         =   "服务器名称:"
         Height          =   180
         Left            =   120
         TabIndex        =   9
         Top             =   360
         Width           =   1080
      End
      Begin VB.Label Label5 
         AutoSize        =   -1  'True
         Caption         =   "登陆账号:"
         Height          =   180
         Left            =   120
         TabIndex        =   8
         Top             =   1320
         Width           =   900
      End
      Begin VB.Label Label6 
         AutoSize        =   -1  'True
         Caption         =   "登陆密码:"
         Height          =   180
         Left            =   120
         TabIndex        =   7
         Top             =   1800
         Width           =   900
      End
   End
   Begin VB.Timer Timer 
      Interval        =   1000
      Left            =   30
      Top             =   4140
   End
   Begin VB.CommandButton cmdCancel 
      Caption         =   "取消"
      Height          =   435
      Left            =   2160
      TabIndex        =   5
      Top             =   3420
      Width           =   975
   End
   Begin VB.CommandButton cmdOk 
      Caption         =   "确认"
      Height          =   435
      Left            =   120
      TabIndex        =   4
      Top             =   3420
      Width           =   1875
   End
   Begin MSComctlLib.StatusBar StatusBar1 
      Align           =   2  'Align Bottom
      Height          =   375
      Left            =   0
      TabIndex        =   11
      Top             =   4080
      Width           =   3330
      _ExtentX        =   5874
      _ExtentY        =   661
      _Version        =   393216
      BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
         NumPanels       =   2
         BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Alignment       =   1
            Bevel           =   0
            Object.Width           =   1764
            MinWidth        =   1764
            Text            =   "时间"
            TextSave        =   "时间"
         EndProperty
         BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Alignment       =   1
            AutoSize        =   1
            Object.Width           =   4022
         EndProperty
      EndProperty
   End
   Begin VB.Label Label3 
      AutoSize        =   -1  'True
      Caption         =   "[配置数据库服务器]"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   240
      Left            =   520
      TabIndex        =   12
      Top             =   480
      Width           =   2310
   End
End
Attribute VB_Name = "frmSelServer"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub cmdCancel_Click()
  Unload Me
End Sub

Private Sub cmdOk_Click()
  If CheckLawData = False Then Exit Sub
  ServerNameStr = Trim(txtServerName.Text)         '服务器名称
  DataBaseNameStr = Trim(txtDataBaseName.Text)     '数据库名称
  DataCount = Trim(txtCount.Text)                  '登陆账号
  PassWordStr = Trim(txtPassword.Text)             '登陆密码
  If ConnectionSQLServer Then
     Call SaveDataIniFile(PassWordStr)
  Else
     MsgBox "连接不成功!请检查您填写的连接信息!", vbCritical + vbOKOnly, "系统提示:"
     txtServerName.SetFocus
     Exit Sub
  End If
  Unload Me
End Sub

Private Sub Form_Load()
  Me.Left = (Screen.Width - Me.Width) / 2
  Me.Top = (Screen.Height - Me.Height) / 2
End Sub

Private Function CheckLawData() As Boolean
  CheckLawData = True
  If Trim(txtServerName.Text) = "" Then
    MsgBox "请填写“服务器名称”", vbExclamation + vbOKOnly, "系统提示:"
    txtServerName.SetFocus
    CheckLawData = False
    Exit Function
  End If
  If Trim(txtDataBaseName.Text) = "" Then
    MsgBox "请填写“数据库名称”", vbExclamation + vbOKOnly, "系统提示:"
    txtDataBaseName.SetFocus
    CheckLawData = False
    Exit Function
  End If
  If Trim(txtCount.Text) = "" Then
    MsgBox "请填写“登陆账号”", vbExclamation + vbOKOnly, "系统提示:"
    txtCount.SetFocus
    CheckLawData = False
    Exit Function
  End If
End Function


⌨️ 快捷键说明

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