VB的显示/隐藏Start按钮

2008-02-23 06:57:54来源:互联网 阅读 ()

新老客户大回馈,云服务器低至5折

' * Module Name : Start_Module
' * Module Filename : Start.bas
' *********************************************************
' * Comments : Show/Hide the start button
' ********************************************************
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long

Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long

Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long

Public Function hideStartButton()
'This Function Hides the Start Button'
OurParent& = FindWindow("Shell_TrayWnd", "")
OurHandle& = FindWindowEx(OurParent&, 0, "Button", VBNullString)
ShowWindow OurHandle&, 0
End Function

Public Function showStartButton()
'This Function Shows the Start Button'
OurParent& = FindWindow("Shell_TrayWnd", "")
OurHandle& = FindWindowEx(OurParent&, 0, "Button", vbNullString)

ShowWindow OurHandle&, 5
End Function

上一篇: 做出分隔线
下一篇: 一个封装了WinInet API函数的类(CWinInetConnection)

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:AVI文件格式

下一篇:在VB中模拟实现邮件传输