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

📄 frmserver.frm

📁 这是一个选课系统
💻 FRM
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
Begin VB.Form frmserver 
   BorderStyle     =   0  'None
   Caption         =   "Form1"
   ClientHeight    =   6270
   ClientLeft      =   4905
   ClientTop       =   2310
   ClientWidth     =   6930
   LinkTopic       =   "Form1"
   ScaleHeight     =   6270
   ScaleWidth      =   6930
   ShowInTaskbar   =   0   'False
   Begin VB.CommandButton Command2 
      Caption         =   "取  消"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   3600
      TabIndex        =   12
      Top             =   5160
      Width           =   1335
   End
   Begin VB.CommandButton Command1 
      Caption         =   "连  接"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   1560
      TabIndex        =   11
      Top             =   5160
      Width           =   1335
   End
   Begin MSComctlLib.StatusBar StatusBar1 
      Align           =   2  'Align Bottom
      Height          =   375
      Left            =   0
      TabIndex        =   9
      Top             =   5895
      Width           =   6930
      _ExtentX        =   12224
      _ExtentY        =   661
      Style           =   1
      SimpleText      =   "请注意:用户名和密码用的SQLServer登录用户"
      _Version        =   393216
      BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
         NumPanels       =   1
         BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
         EndProperty
      EndProperty
   End
   Begin TabDlg.SSTab SSTab1 
      Height          =   3735
      Left            =   840
      TabIndex        =   0
      Top             =   1200
      Width           =   5055
      _ExtentX        =   8916
      _ExtentY        =   6588
      _Version        =   393216
      Tabs            =   2
      TabHeight       =   520
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "幼圆"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      TabCaption(0)   =   "非信任连接"
      TabPicture(0)   =   "frmserver.frx":0000
      Tab(0).ControlEnabled=   -1  'True
      Tab(0).Control(0)=   "Label2"
      Tab(0).Control(0).Enabled=   0   'False
      Tab(0).Control(1)=   "Label4"
      Tab(0).Control(1).Enabled=   0   'False
      Tab(0).Control(2)=   "Label5"
      Tab(0).Control(2).Enabled=   0   'False
      Tab(0).Control(3)=   "Combo1"
      Tab(0).Control(3).Enabled=   0   'False
      Tab(0).Control(4)=   "Text1"
      Tab(0).Control(4).Enabled=   0   'False
      Tab(0).Control(5)=   "Text2"
      Tab(0).Control(5).Enabled=   0   'False
      Tab(0).ControlCount=   6
      TabCaption(1)   =   "信任连接"
      TabPicture(1)   =   "frmserver.frx":001C
      Tab(1).ControlEnabled=   0   'False
      Tab(1).Control(0)=   "Label6"
      Tab(1).Control(0).Enabled=   0   'False
      Tab(1).Control(1)=   "Combo2"
      Tab(1).Control(1).Enabled=   0   'False
      Tab(1).ControlCount=   2
      Begin VB.ComboBox Combo2 
         Height          =   300
         ItemData        =   "frmserver.frx":0038
         Left            =   -72840
         List            =   "frmserver.frx":003F
         TabIndex        =   8
         Top             =   1320
         Width           =   1695
      End
      Begin VB.TextBox Text2 
         Height          =   375
         IMEMode         =   3  'DISABLE
         Left            =   2160
         PasswordChar    =   "*"
         TabIndex        =   6
         Top             =   2520
         Width           =   1815
      End
      Begin VB.TextBox Text1 
         Height          =   375
         Left            =   2160
         TabIndex        =   4
         Top             =   1560
         Width           =   1815
      End
      Begin VB.ComboBox Combo1 
         Height          =   300
         ItemData        =   "frmserver.frx":004C
         Left            =   2160
         List            =   "frmserver.frx":0053
         TabIndex        =   2
         Top             =   840
         Width           =   1815
      End
      Begin VB.Label Label6 
         Caption         =   "服务器名"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   -74280
         TabIndex        =   7
         Top             =   1440
         Width           =   1335
      End
      Begin VB.Label Label5 
         Caption         =   "密码"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   720
         TabIndex        =   5
         Top             =   2520
         Width           =   1095
      End
      Begin VB.Label Label4 
         Caption         =   "用户名"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   720
         TabIndex        =   3
         Top             =   1680
         Width           =   855
      End
      Begin VB.Label Label2 
         Caption         =   "服务器名"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   720
         TabIndex        =   1
         Top             =   840
         Width           =   1335
      End
   End
   Begin VB.Image Imageicon 
      Height          =   315
      Left            =   1800
      Picture         =   "frmserver.frx":0060
      Stretch         =   -1  'True
      Top             =   120
      Width           =   315
   End
   Begin VB.Label lblTitle 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "配置服务器"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   240
      Left            =   2880
      TabIndex        =   10
      Top             =   480
      Width           =   1275
   End
   Begin VB.Image imgTitleMinimize 
      Height          =   210
      Left            =   5640
      Picture         =   "frmserver.frx":1D2A
      Stretch         =   -1  'True
      Top             =   120
      Width           =   210
   End
   Begin VB.Image imgTitleHelp 
      Height          =   210
      Left            =   5280
      Picture         =   "frmserver.frx":1F74
      Stretch         =   -1  'True
      Top             =   120
      Width           =   210
   End
   Begin VB.Image imgTitleclose 
      Height          =   195
      Left            =   5880
      Picture         =   "frmserver.frx":21BE
      ToolTipText     =   "Close"
      Top             =   120
      Width           =   195
   End
   Begin VB.Image imgTitleRestore 
      Height          =   195
      Left            =   4560
      Picture         =   "frmserver.frx":2408
      ToolTipText     =   "Maximize (Disabled)"
      Top             =   120
      Visible         =   0   'False
      Width           =   195
   End
   Begin VB.Image imgTitleMaximize 
      Height          =   195
      Left            =   4920
      Picture         =   "frmserver.frx":2652
      ToolTipText     =   "Maximize (Disabled)"
      Top             =   120
      Visible         =   0   'False
      Width           =   195
   End
   Begin VB.Image imgWindowBottomRight 
      Height          =   450
      Left            =   1080
      Picture         =   "frmserver.frx":289C
      Top             =   0
      Width           =   285
   End
   Begin VB.Image imgWindowBottomLeft 
      Height          =   450
      Left            =   720
      Picture         =   "frmserver.frx":2FE6
      Top             =   0
      Width           =   285
   End
   Begin VB.Image imgTitleMain 
      Height          =   450
      Left            =   0
      Picture         =   "frmserver.frx":3730
      Stretch         =   -1  'True
      Top             =   450
      Width           =   285
   End
   Begin VB.Image imgWindowBottom 
      Height          =   450
      Left            =   360
      Picture         =   "frmserver.frx":3E7A
      Stretch         =   -1  'True
      Top             =   480
      Width           =   285
   End
   Begin VB.Image imgTitleRight 
      Height          =   450
      Left            =   360
      Picture         =   "frmserver.frx":45C4
      Top             =   0
      Width           =   285
   End
   Begin VB.Image imgTitleLeft 
      Height          =   450
      Left            =   0
      Picture         =   "frmserver.frx":4D0E
      Top             =   0
      Width           =   285
   End
   Begin VB.Image imgWindowRight 
      Height          =   450
      Left            =   720
      Picture         =   "frmserver.frx":5458
      Stretch         =   -1  'True
      Top             =   480
      Width           =   285
   End
   Begin VB.Image imgWindowLeft 
      Height          =   450
      Left            =   1080
      Picture         =   "frmserver.frx":5BA2
      Stretch         =   -1  'True
      Top             =   480
      Width           =   285
   End
End
Attribute VB_Name = "frmserver"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Combo1_KeyPress(KeyAscii As Integer)
 If KeyAscii = 13 Then
    Text1.SetFocus
 End If
End Sub

Private Sub Command1_Click()
  
  If SSTab1.Tab = 0 Then
       
       If Combo1.Text = "" Then
           MsgBox "请输入服务器名", vbInformation + vbOKOnly, "提示"
           Exit Sub
       Else
          Server = Trim(Combo1.Text)
       End If
       
       If Text1.Text = "" Then
           MsgBox "请输入SQL server服务品登录用户名", vbInformation + vbOKOnly, "提示"
           Exit Sub
       Else
          User = Trim(Text1.Text)
       End If
       If Text1.Text = "" Then
           MsgBox "请输入SQL server服务品登录密码", vbInformation + vbOKOnly, "提示"
         Exit Sub
      Else
      
         Password = Trim(Text2.Text)
       End If
       
       sqlstring = "driver={SQL Server};server=" + Trim(Server) + ";uid=" + Trim(User) + ";pwd=" + Trim(Password) + ";database=stuchoose"
       
 Else
       If Combo2.Text = "" Then
           MsgBox "请输入服务器名", vbInformation + vbOKOnly, "提示"
           Exit Sub
       Else
         
           Server = Trim(Combo2.Text)
           sqlstring = "driver={SQL Server};server=" + Trim(Server) + ";Trusted_Connection=yes;database=stuchoose"
        End If
  End If
   
   
   If MyDB.openDB = True Then
      frmmessage.Show
      ' frmlogin.Show
       Unload Me
   Else
       MsgBox "配置服务器有错误,请检查是否输入正确", vbInformation + vbOKOnly, "提示"
   End If
End Sub

Private Sub Command2_Click()
  End
End Sub




Private Sub Form_Load()
MakeWindow Me
End Sub



Private Sub text1_KeyPress(KeyAscii As Integer)
  If KeyAscii = 13 Then
     Text2.SetFocus
  End If
End Sub



Private Sub imgTitleclose_Click()
    intNumField = -2
    Unload Me
End Sub

Private Sub imgTitleLeft_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    DoDrag Me
End Sub

Private Sub imgTitleMain_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    DoDrag Me
End Sub

Private Sub imgTitleMinimize_Click()
    Me.WindowState = 1
End Sub

Private Sub imgTitleRight_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    DoDrag Me
End Sub

Private Sub lblTitle_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    DoDrag Me
End Sub

Private Sub text2_KeyPress(KeyAscii As Integer)
  If KeyAscii = 13 Then
      Command1.Value = True
  End If
End Sub

⌨️ 快捷键说明

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