也可以做个关闭时隐藏再弹出一个只有一个按钮的小窗口放在角落,点按钮时这小窗口隐藏大窗口显示 非模态窗口的正确使用方法有两种,一是用控件,二是用代码
代码方式的如下:
Option Explicit
Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Sub UserForm_Initialize()
SetParent FindWindow(vbNullString, Me.Caption), Application.HWND
End Sub
页:
1
[2]