概述
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 Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
'1.声明方法
Const SWP_HIDEWINDOW = &H80 '隐藏视窗
Const SWP_SHOWWINDOW = &H40 '显示视窗
'2.在Form_load中加入代码
Private Sub Form_Load()
Dim Thwnd As Long
Form1.BackColor = RGB(206, 223, 247)
Thwnd = FindWindow("Shell_traywnd", "")
Call SetWindowPos(Thwnd, 0, 0, 0, 0, 0, SWP_SHOWWINDOW)
SetWindowPos Me.hwnd, -1, 0, 0, 0, 0, 3
Me.WindowState = 2
End Sub <!-- 导入 在此 参考资料--><!-- end 参考资料-->
最后
以上就是寒冷小刺猬为你收集整理的FORM 窗口总在最前(显示隐藏视窗)的全部内容,希望文章能够帮你解决FORM 窗口总在最前(显示隐藏视窗)所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复