msgsub.bas

来自「vb做的数据库 客户管理系统」· BAS 代码 · 共 17 行

BAS
17
字号
Attribute VB_Name = "msgSub"
'设置 Always on top 声明
Private 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


'设置 Always on top
'------------------------------------------------------------
Public Sub frmOnTop(Form As Form, OnTop As Boolean)
    If OnTop Then
        SetWindowPos Form.hwnd, -1, 0, 0, 0, 0, 1 Or 2
    Else
        SetWindowPos Form.hwnd, -2, 0, 0, 0, 0, 1 Or 2
    End If
End Sub

⌨️ 快捷键说明

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