VB.net 2010 视频教程 VB.net 2010 视频教程 python基础视频教程
SQL Server 2008 视频教程 c#入门经典教程 Visual Basic从门到精通视频教程
当前位置:
首页 > 编程开发 > vb >
  • VB的显示/隐藏Start按钮

作者:Waty Thierry 
’ * 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

相关教程