Results 1 to 3 of 3

Thread: [2005] Minimize All?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2006
    Posts
    135

    [2005] Minimize All?

    I am making a screen locker program. But i have hit a block, I don't know how to Minimize all other programs.

    I have tried a sample that I found in vb6 but it didnt work.
    Code: http://www.freevbcode.com/ShowCode.Asp?ID=601

    Also, if anyone knows how to hide the desktop icons & start bar that would save me some time.

  2. #2
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: [2005] Minimize All?

    before you get too far into this project, are you making this just for fun?

    It is next to impossible to create a real screen locking program in .NET, as you can't hook ctrl+alt+delete to prevent it from being used to simply close your program.

    You can search high and low for code to disable ctrl+alt+delete, but it doesn't really work on newer NT based systems, they are generally shoddy hacks that change registry settings on the user.

  3. #3
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: [2005] Minimize All?

    here is the code to do it either way.

    It works with option strict coding on.

    I only tested it on XP, and I imagine it may not work on some older systems.
    VB Code:
    1. Dim MyShell As Object = Nothing
    2.         Dim MyType As Type = Type.GetTypeFromCLSID(New Guid("13709620-C279-11CE-A49E-444553540000"))
    3.         MyShell = MyType.InvokeMember(Nothing, BindingFlags.CreateInstance Or BindingFlags.Default, Nothing, Nothing, Nothing)
    4.         MyType.InvokeMember("ToggleDesktop", BindingFlags.Default Or BindingFlags.InvokeMethod, Nothing, MyShell, Nothing)

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