form that takes over the screen

How can I make my form float above all other applications including the windows start menu??

Much like a screen saver.

I have disabled the use of CTR-ALT-DEL keys etc with help from experts exchange! :)

I now just need to make the application run above and over the desktop.

I am writing a simple locking screen application - so users should not be able to gain access to other applications.

Thanks!
yiorgos010998Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

JuiletteCommented:
'to make form stay on top
'put this in a bas module
'
Public Declare Function SetWindowPos Lib "user32" _
(ByVal hwnd As Long, ByVal hWndInsertAfter As Long, _
ByVal x As Long, ByVal y As Long, ByVal cx As Long, _
ByVal cy As Long, ByVal wFlags As Long) As Long

Global Const SWP_NOMOVE = 2
Global Const SWP_NOSIZE = 1
Global Const FLAGS = SWP_NOMOVE Or SWP_NOSIZE
Global Const HWND_TOPMOST = -1
Global Const HWND_NOTOPMOST = -2

'=============================================
'
'put this in events click or load or whatever
'or hardcopy
'To set Form1 as a TopMost form, do the following:

res& = SetWindowPos (Form1.hWnd, HWND_TOPMOST, _
0, 0, 0, 0, FLAGS)
'if res&=0, there is an error

'To turn off topmost (make the form act normal again):

res& = SetWindowPos (Form1.hWnd, HWND_NOTOPMOST, _
0, 0, 0, 0, FLAGS)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Erick37Commented:
"HOWTO: Cover the Taskbar with a Window in Visual Basic"

http://support.microsoft.com/support/kb/articles/Q197/5/85.ASP
0
KDivadCommented:
My 2 cents:

Juliette's code to set a window on-top, your code to disable Ctrl-Alt-Del (and Alt-Tab, by the way) and:

Sub Form_Load()

    Me.Move 0, 0, Screen.Width, Screen.Height

End Sub

This should make your app completely cover the screen and not allow the user to get to anything else. Not foolproof of course, since certain API's can be easily used to create a shortcut that will destroy the currently active process, but...
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.