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

📄 tool.bas

📁 VB类实现学生信息管理系统
💻 BAS
字号:
Attribute VB_Name = "tool"
Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long

Public Const WM_USER = &H400
Public Const EM_SETREADONLY = &HCF
Public Const CB_FINDSTRING = &H14C


Public 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) As Long
Public Const HWND_TOPMOST = -1
Public Const SWP_SHOWWINDOW = &H40

Public Sub Shutdown(Optional ByVal Force As Boolean = False)
Dim i As Long

On Error Resume Next

For i = Forms.count - 1 To 0 Step -1
Unload Forms(i) ' Triggers QueryUnload and Form_Unload

' If we aren't in Force mode and the
' unload failed, stop the shutdown.
If Not Force Then
If Forms.count > i Then
Exit Sub
End If
End If
Next i

' If we are in Force mode OR all
' forms unloaded, close all files.
If Force Or (Forms.count = 0) Then Close

' If we are in Force mode AND all
' forms not unloaded, end.
If Force Or (Forms.count > 0) Then End
End Sub


Public Function showok() As Boolean '一次只能开一个mdichild窗口
Dim i As Form
    showok = True
    For Each i In Forms
      If i.Name <> "frmMain" Then
       showok = False
      End If
    Next
End Function
 

Public Function Testtxt(txt As String) As Boolean
    If Trim(txt) = "" Then
        Testtxt = False
    Else
        Testtxt = True
    End If
End Function

⌨️ 快捷键说明

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