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

📄 module1.bas

📁 旅行社管理信息系统主要实现旅游路线、景点、交通工具等的查询、修改和删除功能
💻 BAS
字号:
Attribute VB_Name = "Module1"
Option Explicit
Public ServerIp As String               '数据库IP的址

Public LR_user_Name As String              '用户名

Public cnntemp As New ADODB.Connection
Public rstTemp As New ADODB.Recordset
Public bAdmin As Boolean
Public Const CB_SHOWDROPDOWN = &H14F
Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Declare Sub RTLMoveMemory Lib "kernel32" (ipvdest As Any, ipvsource As Any, ByVal cbcopy As Long)
'Declare Function SetWindowPos& Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long)
'以下两行为令窗体永远置前的声明,然后在各子窗体中调用
Public Const HWND_TOPMOST = -1

Declare Function SetWindowPos& Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long)

Public flagqy As String
Public flagjb1 As String
Public flagjb2 As String
Public flagJyfs As String
Private Const STR_SORT_ASC = "△"
Private Const STR_SORT_DESC = "▽"
Public F1Obj As Byte

Public Sub load_severip()
    Open "serverip.txt" For Input As 1
    Line Input #1, ServerIp
    Close 1
End Sub



'Private Sub Main()
'
'
'    Dim fLogin As New frmLogin
'
'    If App.PrevInstance Then
'        MsgBox "程序正在运行!", vbInformation
'        Exit Sub
'    End If
'        fLogin.Show vbModal
'        If Not fLogin.OK Then
'            '登录失败,退出应用程序
'            End
'        End If
'        Unload fLogin
'
'        frmSplash.Show
'        frmSplash.Refresh
'    Set fMainForm = New MDIFrmmain
'    Load MDIFrmmain
'
'End Sub

Public Sub DirectRecordset(str As String, Rst As ADODB.Recordset)

    Dim strConnect As String
    strConnect = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=" & _
    App.Path & "\travel.mdb"
    
    With Rst
        If .State = adStateOpen Then
            .Close
        End If
        
        .LockType = adLockOptimistic
        .CursorLocation = adUseClient
        .ActiveConnection = strConnect
        .Open str, Options:=adCmdText
    End With
End Sub
Sub SeLectAll(Ctr As Control)
    On Error Resume Next
    Ctr.SelStart = 0
    Ctr.SelLength = Len(Ctr.Text)
    Ctr.SetFocus
End Sub



⌨️ 快捷键说明

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