CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7

Thread: Disable.......

  1. #1
    Join Date
    Jan 2000
    Posts
    45

    Disable.......

    I dont care which one you answer. Please give me VB code. Any help is
    appreciated.
    #1.How do I disable/hide the start menu?
    #2.How would I hide all icons on the desktop?
    #3.How would I disable the right right click of the mouse?


  2. #2
    Join Date
    Jan 2000
    Location
    CA
    Posts
    52

    Re: Disable.......

    I don't know exactly how to hide the taskbar, but the MSDN Knowledge Base article that is at the address below has some good information. You will probably be able to hide the taskbar by Deregistering it, but be sure that your code re-registers the bar when you are finished.

    http://support.microsoft.com/support...NG=ENG&SA=MSDN

    Good Luck...


  3. #3
    Join Date
    Jan 2000
    Location
    CA
    Posts
    52

    Re: Disable.......

    And try this article for the right mouse button
    (It may be pretty close to what you need)

    http://support.microsoft.com/support...G=ENG&SA=ALLKB


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

    Re: Disable.......

    You can accomplish #1 and #2 with this http://codeguru.developer.com/vb/articles/1752.shtml

    Chris Eastwood

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

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

    Re: Disable.......

    Why don't you just shutdown the computer to remove everything? LOL
    here is the way to hide taskbar:
    declare this

    private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (byval lpClassName as string, byval lpWindowName as string) as Long
    private Declare Function ShowWindow Lib "user32" (byval hwnd as Long, byval nCmdShow as Long) as Long


    and this is to remove the bar

    Handle = FindWindow("Shell_TrayWnd", vbNullString)
    ShowWindow Handle, 0


    change last 0 to 1 to show taskbar

    to disable the icons just make your form size of desktop and remove all the titlebar buttons, all the controls and make it stay at the top of the screen like me.top = 0, me.left = 0
    that's really simple and ugly version of removing icons......but I don't know any other way



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

    Re: Disable.......

    You can hide all the desktop icons using the code I wrote at the link I provided (http://codeguru.developer.com/vb/articles/1752.shtml)

    Chris Eastwood

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

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

    Re: Disable.......

    Thanks Chris...I tried to do something with desktop long time ago, but after I found "progman" (with spy++), I kind of got a bit confused with that, plus all this expiriments could give bad end that you'll have to restart your computer manually, so I decided not to continue. Thanks for the code.


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