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

📄 remontop.bas

📁 例子演示移走form中的on top属性(1KB)
💻 BAS
字号:
Attribute VB_Name = "RemOntop"
Option Explicit

#If Win16 Then
    Declare Sub SetWindowPos Lib "User" (ByVal hwnd As Integer, ByVal hWndInsertAfter As Integer, ByVal x As Integer, ByVal y As Integer, ByVal cx As Integer, ByVal cy As Integer, ByVal wFlags As Integer)
#Else
    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
#End If

Const SWP_NOMOVE = 2
Const SWP_NOSIZE = 1
Const HWND_TOPMOST = -1
Const HWND_NOTOPMOST = -2

'*************************************************************************
'* Function: RemoveOnTop(frmIn As Form)
'*
'*
'*************************************************************************
'* Description: Removes the OnTop setting from a form.
'*
'*
'*************************************************************************
'* Parameters: Ascii Char
'*
'*************************************************************************
'* Notes:
'*
'*************************************************************************
'* Returns:
'*************************************************************************
Sub RemoveOnTop(frmIn As Form)
Const wFlags = SWP_NOMOVE Or SWP_NOSIZE

    SetWindowPos frmIn.hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, wFlags

End Sub

⌨️ 快捷键说明

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