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

📄 frmlogin.frm

📁 vb开发的连接mysql的工作流设置程序,图形化工作流自定义工具,原先是连接到Domino上的工作流自定义工具,现修改至mysql上,后台管理员设置工作流,前台读取数据库调用.
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmLogin 
   BorderStyle     =   4  'Fixed ToolWindow
   ClientHeight    =   5880
   ClientLeft      =   45
   ClientTop       =   270
   ClientWidth     =   6150
   Icon            =   "frmLogin.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   5880
   ScaleWidth      =   6150
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  '屏幕中心
   Begin VB.TextBox txt 
      Height          =   345
      IMEMode         =   3  'DISABLE
      Index           =   5
      Left            =   1920
      PasswordChar    =   "*"
      TabIndex        =   8
      Top             =   3840
      Width           =   3165
   End
   Begin VB.TextBox txt 
      Height          =   345
      Index           =   3
      Left            =   1920
      TabIndex        =   6
      Top             =   2640
      Width           =   3165
   End
   Begin VB.CommandButton cmd 
      Cancel          =   -1  'True
      Caption         =   "取消"
      Height          =   435
      Index           =   1
      Left            =   3600
      TabIndex        =   9
      Top             =   5160
      Width           =   1065
   End
   Begin VB.CommandButton cmd 
      Caption         =   "确定"
      Default         =   -1  'True
      Height          =   435
      Index           =   0
      Left            =   1440
      TabIndex        =   0
      Top             =   5160
      Width           =   1065
   End
   Begin VB.Frame fra 
      Caption         =   "工作流登陆"
      Height          =   4695
      Index           =   1
      Left            =   360
      TabIndex        =   10
      Top             =   240
      Width           =   5625
      Begin VB.TextBox txt 
         Height          =   345
         IMEMode         =   3  'DISABLE
         Index           =   4
         Left            =   1560
         TabIndex        =   7
         Top             =   3000
         Width           =   3165
      End
      Begin VB.TextBox txt 
         Height          =   345
         Index           =   2
         Left            =   1560
         TabIndex        =   4
         Top             =   1800
         Width           =   3165
      End
      Begin VB.TextBox txt 
         Height          =   345
         Index           =   1
         Left            =   1560
         TabIndex        =   2
         Top             =   1200
         Width           =   3165
      End
      Begin VB.CommandButton cmd 
         Caption         =   "预览"
         Enabled         =   0   'False
         Height          =   315
         Index           =   2
         Left            =   4800
         TabIndex        =   3
         Top             =   1200
         Visible         =   0   'False
         Width           =   585
      End
      Begin VB.CommandButton cmd 
         Caption         =   "预览"
         Enabled         =   0   'False
         Height          =   345
         Index           =   3
         Left            =   4800
         TabIndex        =   5
         Top             =   1800
         Visible         =   0   'False
         Width           =   585
      End
      Begin VB.TextBox txt 
         Height          =   345
         Index           =   0
         Left            =   1560
         TabIndex        =   1
         Top             =   600
         Width           =   3165
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "端  口  号:"
         Height          =   180
         Index           =   5
         Left            =   480
         TabIndex        =   16
         Top             =   2445
         Width           =   1080
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "密    码:"
         Height          =   180
         Index           =   4
         Left            =   480
         TabIndex        =   15
         Top             =   3600
         Width           =   1080
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "数 据 库:"
         Height          =   180
         Index           =   2
         Left            =   480
         TabIndex        =   14
         Top             =   1872
         Width           =   1080
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "数  据  源:"
         Height          =   180
         Index           =   1
         Left            =   480
         TabIndex        =   13
         Top             =   1296
         Width           =   1080
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "用 户 名:"
         Height          =   180
         Index           =   3
         Left            =   480
         TabIndex        =   12
         Top             =   3024
         Width           =   1080
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "服 务 器:"
         Height          =   180
         Index           =   0
         Left            =   480
         TabIndex        =   11
         Top             =   720
         Width           =   1080
      End
   End
End
Attribute VB_Name = "frmLogin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private mServerInfo As String
Private mDBInfo() As String
Public Function Display(vName() As String) As String()
    Dim i As Integer
    mDBInfo = vName
    FileName(0) = vName(0)
    FileName(1) = vName(1)
    FileName(2) = vName(2)
    FileName(3) = vName(3)
    FileName(4) = vName(4)
    FileName(5) = vName(5)
    Me.Show vbModal
    Display = mDBInfo
End Function

Private Sub cmd_Click(Index As Integer)
    Dim i As Long, strFile As String
    Dim server, dsn, database, port, user, pass As String
    Select Case Index
    Case 0
            server = Trim(txt(0))
            dsn = Trim(txt(1))
            database = Trim(txt(2))
            port = Trim(txt(3))
            user = Trim(txt(4))
            pass = Trim(txt(5))
            If server = "" Then
                MsgBox "请输入服务器IP地址!", vbOKOnly + vbInformation, "系统提示"
                Me.txt(0).SetFocus
                Exit Sub
            End If
            If dsn = "" Then
                MsgBox "请输入数据源驱动!", vbOKOnly + vbInformation, "系统提示"
                Me.txt(1).SetFocus
                Exit Sub
            End If
            If database = "" Then
                MsgBox "请输入数据库名!", vbOKOnly + vbInformation, "系统提示"
                Me.txt(2).SetFocus
                Exit Sub
            End If
            If port = "" Then
                MsgBox "请输入端口号!", vbOKOnly + vbInformation, "系统提示"
                Me.txt(3).SetFocus
                Exit Sub
            End If
            If user = "" Then
                MsgBox "请输入用户名!", vbOKOnly + vbInformation, "系统提示"
                Me.txt(4).SetFocus
                Exit Sub
            End If
            If pass = "" Then
                MsgBox "请输入密码!", vbOKOnly + vbInformation, "系统提示"
                Me.txt(5).SetFocus
                Exit Sub
            End If
            ReDim mDBInfo(0 To 5)
            mDBInfo(0) = server
            mDBInfo(1) = dsn
            mDBInfo(2) = database
            mDBInfo(3) = port
            mDBInfo(4) = user
            mDBInfo(5) = pass
            
      Unload Me
    Case 1
            ReDim mDBInfo(0)
               Unload Me
               Exit Sub
    'Case 2
    '触发浏览按钮
    '    strFile = frmDir.Display(FileName(Index - 2))
    '    If strFile <> "" Then
    '        FileName(Index - 2) = strFile
    '    End If
    'Case 3
    '触发浏览按钮
    Case Else
    End Select
End Sub


Private Property Let FileName(Index As Integer, value As String) '给文本框赋值
    Dim i As Integer
    Dim lenght As Integer
    lenght = Len(value)
    i = InStr(1, value, "$")
    txt(Index) = Right$(value, lenght - i)
    
End Property


⌨️ 快捷键说明

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