展开全部
Private Declare Function SetWindowPos Lib "user32.dll" (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 Boolean
Const SWP_NOMOVE = &H2
Const SWP_NOSIZE = &H1
Const HWND_TOPMOST = -1
Const FLAGS = SWP_NOMOVE Or SWP_NOSIZE
Dim btopmost As Boolean
Private Sub Form_Load()
If btopmost = False Then
SetWindowPos Me.hwnd, HWND_TOPMOST, Me.Left, Me.Top, Me.Width, Me.Height, FLAGS
btopmost = True
End If
End Sub
Const SWP_NOMOVE = &H2
Const SWP_NOSIZE = &H1
Const HWND_TOPMOST = -1
Const FLAGS = SWP_NOMOVE Or SWP_NOSIZE
Dim btopmost As Boolean
Private Sub Form_Load()
If btopmost = False Then
SetWindowPos Me.hwnd, HWND_TOPMOST, Me.Left, Me.Top, Me.Width, Me.Height, FLAGS
btopmost = True
End If
End Sub
展开全部
你试试这个。
=================
Private Sub Command1_Click()
Shell "c:\windows\notepad.exe", vbNormalFocus
End Sub
=================
Private Sub Command1_Click()
Shell "c:\windows\notepad.exe", vbNormalFocus
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
首先添加API SetWindowPos 然后在按钮的点击事件调用这个东西就好了调用用 Call SetWindowPos(Me.hwnd, -1, 0, 0, 0, 0, &H1 + &H2)
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询