01
02
03
04
05
06
07
08
09
10
11 |
|
Private Declare PtrSafe Function FindWindowA Lib "user32" ( _
ByVal lpClassName As String, ByVal lpWindowName As String) As LongPtr
Private Declare PtrSafe Function SetWindowPos Lib "user32" ( _
ByVal Hwnd As LongPtr, ByVal hWndInsertAfter As LongPtr, _
ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, _
ByVal wFlags As Long) As Long
Private Const HWND_TOPMOST = -1
Private Sub UserForm_Activate()
SetWindowPos FindWindowA(vbNullString, Me.Caption), HWND_TOPMOST, 0, 0, 0, 0, &H3
End Sub
|