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

📄 frmserver.frm

📁 VB 编写的"华成POS管理系统",代码全,没有进行测试,数据库全,有兴趣的朋友可以测试.
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmServer 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "设置 SQL 服务器"
   ClientHeight    =   2715
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   4560
   Icon            =   "frmServer.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   181
   ScaleMode       =   3  'Pixel
   ScaleWidth      =   304
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  '屏幕中心
   Begin SuperMarket.FTextBox txtUser 
      Height          =   300
      Left            =   1080
      TabIndex        =   1
      Top             =   720
      Width           =   3315
      _extentx        =   5847
      _extenty        =   529
      font            =   "frmServer.frx":000C
      fontname        =   "宋体"
      fontsize        =   9
      autoselall      =   -1  'True
   End
   Begin SuperMarket.XPButton cmdExit 
      Cancel          =   -1  'True
      Height          =   345
      Left            =   3300
      TabIndex        =   5
      Top             =   2220
      Width           =   1095
      _extentx        =   1931
      _extenty        =   609
      caption         =   "取消"
      capalign        =   2
      backstyle       =   2
      font            =   "frmServer.frx":0030
      mode            =   0
      value           =   0   'False
      cback           =   -2147483633
   End
   Begin SuperMarket.XPButton cmdOK 
      Default         =   -1  'True
      Height          =   345
      Left            =   2100
      TabIndex        =   4
      Top             =   2220
      Width           =   1095
      _extentx        =   1931
      _extenty        =   609
      caption         =   "确定"
      capalign        =   2
      backstyle       =   2
      font            =   "frmServer.frx":0054
      mode            =   0
      value           =   0   'False
      cback           =   -2147483633
   End
   Begin SuperMarket.FTextBox txtServer 
      Height          =   300
      Left            =   1080
      TabIndex        =   0
      Top             =   240
      Width           =   3315
      _extentx        =   5847
      _extenty        =   529
      font            =   "frmServer.frx":007C
      fontname        =   "宋体"
      fontsize        =   9
      autoselall      =   -1  'True
   End
   Begin SuperMarket.FTextBox txtPW 
      Height          =   300
      Left            =   1080
      TabIndex        =   2
      Top             =   1200
      Width           =   1995
      _extentx        =   3519
      _extenty        =   529
      font            =   "frmServer.frx":00A0
      fontname        =   "宋体"
      fontsize        =   9
      passwordchar    =   "*"
      autoselall      =   -1  'True
   End
   Begin SuperMarket.FTextBox txtDB 
      Height          =   300
      Left            =   1080
      TabIndex        =   3
      Top             =   1680
      Width           =   3315
      _extentx        =   5847
      _extenty        =   529
      font            =   "frmServer.frx":00C4
      fontname        =   "宋体"
      fontsize        =   9
      autoselall      =   -1  'True
   End
   Begin VB.Label Label4 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "数据库:"
      Height          =   180
      Left            =   240
      TabIndex        =   11
      Top             =   1755
      Width           =   720
   End
   Begin VB.Label lbPW 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "(密码已隐藏)"
      Height          =   180
      Left            =   3240
      TabIndex        =   10
      Top             =   1275
      Visible         =   0   'False
      Width           =   1080
   End
   Begin VB.Label lbCT 
      Appearance      =   0  'Flat
      AutoSize        =   -1  'True
      BackColor       =   &H80000005&
      BackStyle       =   0  'Transparent
      Caption         =   "测试连接中..."
      ForeColor       =   &H00FF0000&
      Height          =   180
      Left            =   240
      TabIndex        =   9
      Top             =   2295
      Visible         =   0   'False
      Width           =   1170
   End
   Begin VB.Label Label3 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "密  码:"
      Height          =   180
      Left            =   240
      TabIndex        =   8
      Top             =   1275
      Width           =   720
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "服务器:"
      Height          =   180
      Left            =   240
      TabIndex        =   7
      Top             =   315
      Width           =   720
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "用户名:"
      Height          =   180
      Left            =   240
      TabIndex        =   6
      Top             =   795
      Width           =   720
   End
End
Attribute VB_Name = "frmServer"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub cmdExit_Click()
    Unload Me
End Sub

Private Sub cmdOK_Click()
On Error GoTo aaaa
    If txtServer.Text = "" Then
        MsgBox "必须填写 SQL 服务器名称或 IP 地址。", vbInformation
        txtServer.SetFocus
        Exit Sub
    End If
    If txtUser.Text = "" Then
        MsgBox "必须填写 SQL 服务器的用户名。", vbInformation
        txtUser.SetFocus
        Exit Sub
    End If
    If txtDB.Text = "" Then
        MsgBox "必须填写数据库的名称。", vbInformation
        txtDB.SetFocus
        Exit Sub
    End If
    lbCT.Visible = True
    DoEvents
    Dim cnTest As New ADODB.Connection
    sqlConnect cnTest, txtServer.Text, txtUser.Text, txtPW.Text, txtDB.Text
    MsgBox "连接 " & txtServer.Text & " 成功!", vbInformation
    cnTest.Close
    SaveServer txtServer.Text, txtUser.Text, txtPW.Text, txtDB.Text
    readServer
    Unload Me
Exit Sub
aaaa:
    MsgBox Err.Description, vbCritical
    lbCT.Visible = False
End Sub

⌨️ 快捷键说明

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