VB中怎样让窗口总在最上层,并且在任务管理器的上层
来源:百度知道 编辑:UC知道 时间:2024/06/10 18:31:17
这道题我提问了两次,谁会做,两个50分都给他.
我试过了,还是不行啊,我是个菜鸟,能不能帮我看看
QQ464317696
d
d
d
楼上的
你怎么到处抄袭别人的东西啊....冒汗....
代码如下:
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)
Dim a
Private Sub Command1_Click()
End
End Sub
Private Sub Form_Load()
Timer1.Enabled = True
Timer1.Interval = 1
End Sub
Private Sub Timer1_Timer()
a = SetWindowPos(Form1.hwnd, -1, 0, 0, 0, 0, 3)
End Sub
Option Explicit
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
Private Const HWND_TOPMOST& = -1
' 将窗口置于列表顶部,并位于任何最顶部窗口的前面
Private Const SWP_NOSIZE& = &H1
' 保持窗口大小
Private Co