[问题]在全萤幕的程式上让视窗置顶
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
Const SWP_NOMOVE = &H2 '不更动目前视窗位置
Const SWP_NOSIZE = &H1 '不更动目前视窗大小
Const HWND_TOPMOST = -1 '设定为最上层
Const HWND_NOTOPMOST = -2 '取消最上层设定
Const FLAGS = SWP_NOMOVE Or SWP_NOSIZE
'在程式呼叫的范例如下所示:
Private Sub Command1_Click()
'将 APP 视窗设定成永远保持在最上层
SetWindowPos Me.hwnd, HWND_TOPMOST, 0, 0, 0, 0, FLAGS
End Sub
Private Sub Command2_Click()
'取消最上层设定
SetWindowPos Me.hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, FLAGS
End Sub
'--------------------------------------------------------------------------
SetWindowPos似乎在全萤幕的视窗上面没有作用
因为我再玩全萤幕的游戏时希望能同时看到某些资料
我也看过有些游戏的外挂,可以在游戏中呼叫出视窗
而不用将游戏跳到桌面,请问该怎么做呢!?