|
-
Jan 24th, 2007, 12:28 PM
#1
Thread Starter
Addicted Member
[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.
-
Jan 24th, 2007, 12:33 PM
#2
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.
-
Jan 24th, 2007, 01:10 PM
#3
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:
Dim MyShell As Object = Nothing
Dim MyType As Type = Type.GetTypeFromCLSID(New Guid("13709620-C279-11CE-A49E-444553540000"))
MyShell = MyType.InvokeMember(Nothing, BindingFlags.CreateInstance Or BindingFlags.Default, Nothing, Nothing, Nothing)
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|