都是置顶,同等效率,激活该窗口即可。 用ShowWindow吧,能使最小化的窗口也回到顶部。Option Explicit Private Const SW_SHOWNORMAL As Long = 1 Private Declare Function ShowWindow Lib "user32.dll" (ByVal hwnd As Long, ByVal nCmdShow As Long) As LongPrivate Sub Command3_Click() ShowWindow &H130570, SW_SHOWNORMAL End Sub
时间:2010-07-25 21:56:53 来自:121.41.244.*
bluelang发表的评论 垃圾,就一句代码。 SetWindowPos TheForm.hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOZORDER SWP_NOMOVE SWP_NOSIZE 而且这句代码在api文本浏览器里面就有!
时间:2010-07-13 15:29:23 来自:219.148.189.*
用ShowWindow吧,能使最小化的窗口也回到顶部。Option Explicit
Private Const SW_SHOWNORMAL As Long = 1
Private Declare Function ShowWindow Lib "user32.dll" (ByVal hwnd As Long, ByVal nCmdShow As Long) As LongPrivate Sub Command3_Click()
ShowWindow &H130570, SW_SHOWNORMAL
End Sub
SetForegroundWindow
这个可以。