CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8
  1. #1
    Join Date
    Jan 2000
    Posts
    45

    Hide the Start Menu

    whats the code for hiding the start menu, and dont tell me just hide the taskbar. thanx


  2. #2
    Join Date
    Aug 1999
    Location
    US, Florida
    Posts
    817

    Re: Hide the Start Menu

    OMG, Chris and I have already answered your post "how to hide icons on desktop, how to hide task bar, and some other "hiding" question"
    Why don't you take your mouse and briefly browse through posting history? Here is the link to your OWN post:
    http://www.codeguru.com/bbs/wt/showp...collapsed&sb=8


  3. #3
    Join Date
    Sep 2000
    Location
    Orange County, California
    Posts
    65

    Re: Hide the Start Menu

    AndyK, you did not listen close enough, Starcraft requested to hide the start menu, not the taskbar, and yes there is a difference between the two.

    Rate the post!
    http://www.visualblind.com

  4. #4
    Join Date
    May 2000
    Location
    New York, NY, USA
    Posts
    2,878

    Re: Hide the Start Menu

    Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
    Public 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
    Public Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long


    Sub HideStartButton()
    Dim Handle As Long, FindClass As Long
    FindClass& = FindWindow("Shell_TrayWnd", "")
    Handle& = FindWindowEx(FindClass&, 0, "Button", vbNullString)
    ShowWindow Handle&, 0
    End Sub


    Sub ShowStartButton()
    Dim Handle As Long, FindClass As Long
    FindClass& = FindWindow("Shell_TrayWnd", "")
    Handle& = FindWindowEx(FindClass&, 0, "Button", vbNullString)
    ShowWindow Handle&, 1
    End Sub
    'Put this code in the form


    Private Sub Command1_Click()
    HideStartButton
    End Sub


    Private Sub Command2_Click()
    ShowStartButton
    End Sub



    Iouri Boutchkine
    [email protected]
    Iouri Boutchkine
    [email protected]

  5. #5
    Join Date
    Sep 2000
    Location
    Orange County, California
    Posts
    65

    Re: Hide the Start Menu

    Thank for that code, I am going to rate it but do you know how to disable the start menu instead of hiding it? When you press the windows key the menu still comes up...

    Rate the post!
    http://www.visualblind.com

  6. #6
    Join Date
    Oct 2000
    Location
    India,Bombay
    Posts
    48

    Re: Hide the Start Menu

    HI, never seen such a phenomenon,
    but when i press 'Ctrl + Esc' or Windows button on the keyboard the start menu appears.
    is there any way i can disable the start menu. ?..
    thanks.


  7. #7
    Join Date
    May 2000
    Location
    New York, NY, USA
    Posts
    2,878

    Re: Hide the Start Menu

    Try this code

    ' Side Effects:Running this little prog.
    ' destroys the STARTbutton, if you want it
    ' back, you have to log-in again or restart
    ' Windows.

    Dim hWnd1 As Long


    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
    Const SW_HIDE = &H0
    Const SW_SHOW = &H5


    Private Declare Function SendMessage Lib "user32" Alias _
    "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, _
    ByVal wParam As Long, lParam As Any) As Long

    Const WM_CLOSE = &H10


    Private Sub Command1_Click()
    SendMessage FindWindowEx( FindWindow("Shell_TrayWnd", ""), 0&, "Button", vbNullString), WM_CLOSE, 0, 0
    End Sub

    Iouri Boutchkine
    [email protected]
    Iouri Boutchkine
    [email protected]

  8. #8
    Join Date
    Sep 2000
    Location
    Orange County, California
    Posts
    65

    Re: Hide the Start Menu

    hehe, you just got that off PSC.

    Rate the post!
    http://www.visualblind.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured