Is there a API-function that displays a system modal "MsgBox"? There should be only one OK-button exist. All open programs should can no longer be activated.
Announcement
Collapse
No announcement yet.
Modal "MsgBox"
Collapse
X
-
Yes and no.
Code:int MessageBox( HWND hWnd, LPCTSTR lpText, LPCTSTR lpCaption, UINT uType
The use of MB_SYSTEMMODAL flag will make the window TOPMOST, but you can still use windows from other applications.
If you want to prevent the user from using other applications, I'd consider a design change. Maybe you need to make your own "message screen" which is full-screen, not resizeable and topmost. You can still go to another window using <Alt+Tab> but not all users know that.Michael Mattias
Tal Systems (retired)
Port Washington WI USA
[email protected]
http://www.talsystems.com
-
From Win32 Programmer's Reference:
MB_TASKMODAL Same as MB_APPLMODAL except that all the top-level windows belonging to the current task are disabled if the hWnd parameter is NULL. Use this flag when the calling application or library does not have a window handle available but still needs to prevent input to other windows in the current application without suspending other applications.
Cheers,Dale
Comment
-
Originally posted by Bernhard Fomm View PostIs there a possibility the key combination (ALT+TAB) to disable?
It's also possible to disable task-switching system wide, Google the registry entry under HKEY_CURRENT_USER\Control Panel\Desktop named "Coolswitch".Mike Stefanik
sockettools.com
Comment
-
Woo. Double post.
Didn't think that was possible.
Well, this one can go....Last edited by Michael Mattias; 25 Jun 2008, 02:39 PM.Michael Mattias
Tal Systems (retired)
Port Washington WI USA
[email protected]
http://www.talsystems.com
Comment
-
>Can the entire keyboard lock? Only ESC and ENTER should work
I hope you are not looking for volunteer testers for this.
But seriously...
What are you doing that you think you need to take over the entire machine like this?
I mean, if this is supposed to be a 'dedicated purpose' machine (like a kiosk) that's fine, but surely there are ways to accomplish that short of the drastic ...
...but you already have an answer for that courtesy of Mr. Stefanik.
MCMMichael Mattias
Tal Systems (retired)
Port Washington WI USA
[email protected]
http://www.talsystems.com
Comment
-
One thing you could do, is detect your app losing focus (I think....not sure about the app itself, but in a MDI situation you are notified if losing focus), and then restore focus if you lost focus
Just a idea....not thought out...just tossing it out thereEngineer's Motto: If it aint broke take it apart and fix it
"If at 1st you don't succeed... call it version 1.0"
"Half of Programming is coding"....."The other 90% is DEBUGGING"
"Document my code????" .... "WHYYY??? do you think they call it CODE? "
Comment
Comment