Hello, I wrote a program : On Windows start up, the user is asked to enter a password, if he does not know it, the computer restart. I want to lock the user on the window of my program because at this moment, the user can continue to use Windows, the window of my program appears before all the other but these windows are still usable. How can I do this or how can I disable/hide the other windows ??
do you know how to get handles on other windows???? if so you can make then HIDE But remember that after your use enters the correct password, to unhide those windows again. if you don't know how to find handles to other windows use this simple code. .data szProgMan db "Progman",0 .code invoke GetDesktopWindow invoke GetWindow, eax, GW_CHILD mov , eax invoke GetWindow, , GW_HWNDNEXT mov ,eax .while eax invoke GetWindowText, , ADDR szWndText, sizeof szWndText invoke GetClassName, , ADDR szWndClass, sizeof szWndClass invoke lstrcmp,addr szWndClass,addr szProgMan .if eax != 0 invoke IsWindowVisible,hWinCur .if eax == TRUE mov esi,offset szWndText mov al, .if al != 0 invoke ShowWindow,hWinCur,SW_SHOWMINIMIZED .endif .endif .endif invoke GetWindow, , GW_HWNDNEXT mov ,eax .endw The code Above works fine for me, I will tell you one thing, you can't please them all, if you find something does not run right on win 2000 or NT who care's those two OS's are really for bussiness use I don't know about anyone else but I like to write for the average user. 95/98/ME there are more of these people and there for more users for your app. anyway I hope this works for you..... If you have your windows the same size as the currents desktop and you hide the task bar and made sure your app has no title bar so the use can't move the window then your doing good, if you don't know how to do that then just ask and I can post code to show how to do this, also there is still away to use a CD to get thru all of this.... If you want to know more about all this just ask..... This message was edited by Zcoder, on 4/15/2001 11:32:41 AM This message was edited by Zcoder, on 4/15/2001 11:38:28 AM
.........I believe that there is a window style that, when active, disables all input from other windows. I know that the MessageBox API has that function. If all else fails, you can GetDesktopWindow and then disable it with the EnableWindow fuction........and then re-enable it when your task is complete.
I think you can create a modal dialog box. that way the user can only use your dialog box. Did you consider that Ctrl-Alt-Del can kick you program out?
if the ctrl+alt+del is your problem so i can try to help i have two code snippets which i wrote in C for win32api one is to disable ctrl+alt+del combiniation and another to remove you program from ctrl+alt+del dialog http://qsoft.cjb.net goto tutorials-->windows you'll see the code snippets i hope it helpes you good luck Arkon http://qsoft.cjb.net