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

    Disabling Startmenu

    hi, i would like to know the code for disabling the start menu, thanks


  2. #2
    Join Date
    Sep 1999
    Location
    Red Wing, MN USA
    Posts
    312

    Re: Disabling Startmenu

    Try the EnableWindow API, ie.

    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 EnableWindow Lib "user32" (byval hwnd as Long, byval fEnable as Long) as Long

    private Sub Command1_Click()
    static bEnabled as Boolean
    Dim lhWnd as Long

    lhWnd = FindWindowEx(0&, 0&, "Shell_TrayWnd", vbNullString)
    lhWnd = FindWindowEx(lhWnd, 0&, "Button", vbNullString)
    Call EnableWindow(lhWnd, bEnabled)
    bEnabled = Not bEnabled
    End Sub




    Aaron Young
    Analyst Programmer
    [email protected]
    [email protected]
    Aaron Young
    Senior Programmer Analyst (Red Wing Software)
    Certified AllExperts Expert

  3. #3
    Join Date
    May 1999
    Location
    Oxford UK
    Posts
    1,459

    Re: Disabling Startmenu

    Nice one Aaron - a bit dangerous though, but interesting none the less.

    Would you like it posted to the site ?



    Chris Eastwood

    CodeGuru - the website for developers
    http://codeguru.developer.com/vb

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