Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / full screen program on top

Author
Message
Big Man
19
Years of Service
User Offline
Joined: 4th Feb 2005
Location: BEHIND YOU!!!! (but I live in England)
Posted: 30th Sep 2006 18:20
hey

how do I go about making it so that when i have a full screen program it stays on top the whole time.

You see i am making a small program that locks the computer so no one else can use it until the password is entered, the only problem is, is by using ctrl,alt,del you can easily exit but i figured if this program was set to be always on top the user will not be able to see the task manager.

Thanks for your help

BM

Our aim is to keep the loo's clean, your aim can help.

3.0ghz pentium dual core processor, 2gb ds ram, 250gb HD
Gil Galvanti
19
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Texas, United States
Posted: 30th Sep 2006 20:47
Don't know if that's possible because I don't think DBP programs can override Windows functions.

Pirates of Port Royale
Live the life of a pirate.
Big Man
19
Years of Service
User Offline
Joined: 4th Feb 2005
Location: BEHIND YOU!!!! (but I live in England)
Posted: 30th Sep 2006 20:54
ok fair enough it was worth a try though

Our aim is to keep the loo's clean, your aim can help.

3.0ghz pentium dual core processor, 2gb ds ram, 250gb HD
lower logic
18
Years of Service
User Offline
Joined: 15th Jun 2006
Location:
Posted: 1st Oct 2006 01:02 Edited at: 1st Oct 2006 01:07
Here's a snippet that disables the task manager. It works for me in WinXP Pro, but I don't see why it wouldn't work for WinXP Home. Other versions of Windows will need slightly different code. I have set window on and still have the escape key enabled in case something goes wrong.

This shouldn't do anything bad to the computer, but with things like this, you never know, so to make things clear, I'm not responsible if you mess up your computer etc blah blah blah.



Basically it works by deleting the task manager, but don't worry! Windows XP automatically recreates the task manager program if someone deletes or moves it. The way to disable it is to constantly delete it every time windows recreates it. The code assumes the task manager is located at
. Also if you exit the program while the task manager is disabled, it should automatically be re-enabled after 10-20 seconds, when windows recreates the taskmgr.exe file.
SimSmall
20
Years of Service
User Offline
Joined: 7th Aug 2004
Location: United Kingdom
Posted: 1st Oct 2006 01:23 Edited at: 1st Oct 2006 01:25
I've just run your code on XP Pro, I managed to interrupt with a simple press of CTRL ALT DEL

Chances you are, that you use the disgusting "Welcome screen"... if you do, press the combo brings up the task manager... I personally hate that welcome screen as you may have gathered, so I log on with the CTRL ALT DEL combo, then enter your username and password dialog. If I press this combo when logged on, it brings up the "windows security" dialog. offering choices in order of:
Lock Computer
Log off
Shutdown
Change Password
Task Manager (where you instantly go to if you use the welcome screen)
Cancel

Really, Microsoft probably will think of things like this when developing the OS... Something so simple would quickly be abused by virus creators if they didn't think of this... But for the most part, if what you've posted works for other people, chances are it'll work in most home environments...

Go to control panel, then user accounts, then "change the way users log on" uncheck "use the welcome screen" then log off and log on again, now see if your code still works... if it does, then my computer is just uber... (But that means my logic is all wrong)
lower logic
18
Years of Service
User Offline
Joined: 15th Jun 2006
Location:
Posted: 1st Oct 2006 02:48
Just tried it, and Ctrl+Alt+Del does work and go to the windows security dialog. Though, if you try to use the task manager from that dialog, it's still disabled when the code snippet is running. So my code just locks up the task manager, but not Ctrl+Alt+Del altogether.
SimSmall
20
Years of Service
User Offline
Joined: 7th Aug 2004
Location: United Kingdom
Posted: 1st Oct 2006 12:46
I completely overlooked this, but my brother pointed it out to me:

Don't you need administrator rights to rename anything in your system 32 folder?

It's silly to assume your user is going to have admin rights, since DB and DBP programs do not need admin rights to run.

Quote: "the only problem is, is by using ctrl,alt,del you can easily exit"


If you looked into the murky world of windows APIs, it might be possible, but then it is a security feature, so it may be completely impossible, an API may be considered a vulnerability by microsoft, so there may not be one.

I believe you're also going to have as many problems with the start button, that's not security, so there's a better chance that you'll be able to override that one
Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 1st Oct 2006 16:16
@Big Man:

To make it harder you can make it run in fullscreen mode and say POSITION MOUSE 0,0. Then they can't move very easily

Ummm...
Twu Kai
18
Years of Service
User Offline
Joined: 2nd Oct 2005
Location:
Posted: 1st Oct 2006 19:52
Or, a simple way would be to do what Sixty Squares said, but each time you detect the key CNTRL, Alt, and Delete, minimize and maximize the program, then the task manager etcetera will stay behind.

It may work.

FROGGIE!
20
Years of Service
User Offline
Joined: 4th Oct 2003
Location: in front of my computer
Posted: 1st Oct 2006 20:18
isnt there a DISABLE SYSTEMKEYS() - not sure if there are brackets - command, that disables ctrl/alt/del
Big Man
19
Years of Service
User Offline
Joined: 4th Feb 2005
Location: BEHIND YOU!!!! (but I live in England)
Posted: 1st Oct 2006 20:21 Edited at: 1st Oct 2006 20:25
hey wow thanks for the responses i will give this lot a try.

I showed my program to my brother and he easily closed it with "Alt+f4" is there anyway to stop this happening?

disable systemkeys doesnt work on win XP

Thanks again

BM

Our aim is to keep the loo's clean, your aim can help.

3.0ghz pentium dual core processor, 2gb ds ram, 250gb HD
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 1st Oct 2006 22:56
If I were you, I'd give up.

You can do it in other low-level languages (C, C++, Delphi come to mind), but even then, it's not easy to do. There's no way can you do it in DBPro without a custom plug-in.

Also, the technique of deleting a system file to stop task manager being run is as silly a method as I've ever heard of, and anyone running your program on a machine that runs an OS that *doesn't* restore system files will not be thanking you for doing so.

Bob_42
18
Years of Service
User Offline
Joined: 15th Sep 2006
Location: Guernsey
Posted: 2nd Oct 2006 01:40 Edited at: 2nd Oct 2006 01:41
another problem you would have is the fact that there are loads of ways of minimsing the progam, or exiting, some that come to mind:

alt+tab
winkey+d
alt+F4
ctrl+m
winkey

so you would have to block all of those and there are probably alot more

i know this isn't using DB, but why not just set your screensaver to come up with an insert password box when you exit the screensaver?

jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 2nd Oct 2006 03:13 Edited at: 2nd Oct 2006 03:15
I agree. It is never a good idea to fight the operating system. A better use of your thought process might be, why would you want to disable all of that in the first place? If you are thinking of using DBPro to make a screen saver, or other system utility...you need to do that within the context of the utility, not the other way around. (In other words, you are trying to muscle in control of the OS, which DBPro is trying to insulate you from.)

EDIT: In fact, you might as well look at the thread about making Win apps using dll calls from within DBPro. THat is the only way you will even get close. All these ideas aside...there will be more issues. Trust me on this.
Big Man
19
Years of Service
User Offline
Joined: 4th Feb 2005
Location: BEHIND YOU!!!! (but I live in England)
Posted: 2nd Oct 2006 18:15
ok thanks guys iv already thought about the screen saver thing and i think i will use that.

The program was only ever for personal use and it was just a small idea.

BM

Our aim is to keep the loo's clean, your aim can help.

3.0ghz pentium dual core processor, 2gb ds ram, 250gb HD

Login to post a reply

Server time is: 2024-09-25 09:31:05
Your offset time is: 2024-09-25 09:31:05