VB display/hide start button

Source: Internet
Author: User
'Author: Waty Thierry
'* Module Name: Start_Module
'* Module Filename: Start. bas
'*************************************** ******************
'* Comments: Show/Hide the start button
'*************************************** *****************
Private Declare Function FindWindow Lib "user32" Alias "find0000wa" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function find1_wex Lib "user32" Alias "find1_wexa" (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 & = find+wex (OurParent &, 0, "Button", vbNullString)
ShowWindow OurHandle &, 0
End Function
Public Function showStartButton () 'This Function Shows the Start Button'
OurParent & = FindWindow ("Shell_TrayWnd ","")
OurHandle & = find+wex (OurParent &, 0, "Button", vbNullString)
ShowWindow OurHandle &, 5
End Function

Private Sub commandementclick ()
HideStartButton
End Sub

Private Sub Command2_Click ()
ShowStartButton
End Sub

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.