The Daily Click ::. Forums ::. Klik Coding Help ::. Overriding Alt+F4 to shut down a program?
 

Post Reply  Post Oekaki 
 

Posted By Message

KevinHaag



Registered
  28/01/2005
Points
  266

VIP Member
6th November, 2008 at 05:06:48 -

Is there a way in MMF2 Dev to stop Alt+F4 from closing the program? I want it only to be closed once an admin has entered a password.

 
Image
http://www.kevinhaag.ca

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
6th November, 2008 at 05:12:47 -

You'd also have to override ctrl-alt-delete:
http://ext.neatwares.ath.cx/ext/Control_X

would that do it?

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456

DakaSha



Registered
  21/10/2008
Points
  32
6th November, 2008 at 05:32:02 -

lol somebodys making a virus ^^

 
n/a

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
6th November, 2008 at 06:24:20 -

making a virus in MMF would be like making a boat out of cement. And I worked on a cement boat.

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456

Muz



Registered
  14/02/2002
Points
  6499

VIP MemberI'm on a BoatI am an April FoolHonored Admin Alumnus
6th November, 2008 at 06:25:53 -

I could probably make a trojan out of it. That's like making a boat out of lead.

 
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.

Image

KevinHaag



Registered
  28/01/2005
Points
  266

VIP Member
6th November, 2008 at 06:40:31 -

I'm not making a virus lol. I'm building a guest registration system where only an admin can exit the program so that customers can't fiddle around outside the program. And I can't get that extension to work on "my" copy of MMF2

 
Image
http://www.kevinhaag.ca

DakaSha



Registered
  21/10/2008
Points
  32
6th November, 2008 at 07:20:29 -

i was just joking

 
n/a

KevinHaag



Registered
  28/01/2005
Points
  266

VIP Member
6th November, 2008 at 07:49:56 -

Heh, well does any body have any ideas on how to do it? Without physically removing the keys, I'm stumped lol

 
Image
http://www.kevinhaag.ca

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
6th November, 2008 at 09:59:56 -

1. Viruses are very possible in MMF!

2. Here's how you disable Alt+F4:

In your application properties, under Window > Style, tick the box "Disable Close Button." Next, go to your application's menu and go to the shortcut for close (Which is Alt + F4). Remove the shortcut and it will be unable to be closed with Alt + F4.

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

X_Sheep

I had a custom rating before it was cool

Registered
  01/03/2004
Points
  1313

VIP MemberPicture Me This -Round 23- Winner!Dos Rules!
6th November, 2008 at 11:25:50 -

There's also an event in MMF2 that intercepts Close commands.

Special > Application Window > Close Window has been selected

If there's an action under this event, the program won't close through Alt+F4 or by clicking the X button, but will perform those actions instead. (like showing a password window). It won't stop people from killing the process from the Task Manager though.

Image Edited by the Author.

 
a/n

-J-



Registered
  05/10/2008
Points
  228

VIP MemberThe Cake is a Lie
6th November, 2008 at 11:44:17 -

I made a program that was just a big red button that said DO NOT PRESS, then when you clicked it it made a buzzing noise then shut down your computer and didn't let you save any work you had open at the time

And I made one that flashed violent colours on your screen really fast and made the internal soundcard in the computer beep constantly, getting higher and higher and it looks and sounds like your computer is about to explode

I have too much time ay..

 
n/a ...

KevinHaag



Registered
  28/01/2005
Points
  266

VIP Member
6th November, 2008 at 14:08:02 -

Thanks! I havn't tried it yet, but thanks anyway!

 
Image
http://www.kevinhaag.ca

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  49667

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 32 Winner!Picture Me This Round 42 Winner!Picture Me This Round 44 Winner!Picture Me This Round 53 Winner!
7th November, 2008 at 06:43:44 -

The best way to do this would be to disable the windows key, ctrl-Alt-Delete, and Alt-F4

If there is a way to shutdown your program someone will find it.


What you need to do is alter the registry key

"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\DisableTaskMgr" set DWORD value to 1
that will disable the task manager so that ctrl-alt-delete will not work.

Disable Close Button to Disable an Alt-F4 exit

and then you need to shutdown the "explorer.exe" process to disable the windows key and all other related hotkeys including volume adjustment.

Use the Registry object to manipulate the registry
And the Process Viewer object to close explorer.exe (Note: you may need to close it every second as windows sometimes attempts to restart it)

Also, I don't know how well this works on Vista

 
n/a

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
7th November, 2008 at 06:59:54 -

It's a good thing none of us have ever been involved in virus production... right UrbanMonk?

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  49667

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 32 Winner!Picture Me This Round 42 Winner!Picture Me This Round 44 Winner!Picture Me This Round 53 Winner!
7th November, 2008 at 15:33:13 -

lol, yeah you have that right

 
n/a

lembi2001



Registered
  01/04/2005
Points
  608

VIP MemberIt's-a me, Mario!Wii OwnerI like Aliens!Has Donated, Thank You!PS3 OwnerI am an April Fool
7th November, 2008 at 17:06:47 -


Originally Posted by KevinHaag
And I can't get that extension to work on "my" copy of MMF2



what do you mean "your" copy???

 
n/a

KevinHaag



Registered
  28/01/2005
Points
  266

VIP Member
9th November, 2008 at 01:48:42 -

You know... my copy.

 
Image
http://www.kevinhaag.ca

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
9th November, 2008 at 04:57:25 -

I'm not following you KevinHaag. What is special about "your" purchased copy of MMF2 Dev?

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

-J-



Registered
  05/10/2008
Points
  228

VIP MemberThe Cake is a Lie
9th November, 2008 at 06:42:53 -

I'm getting the feeling maybe "Purchased" isn't necessary in that sentence Andy... Though I could be wrong

Image Edited by the Author.

 
n/a ...

Aptennap



Registered
  23/04/2004
Points
  916
9th November, 2008 at 07:39:50 -

I think it's his sisters copy, or maybe he found it on the street.

 
Oh sweet mary.

KevinHaag



Registered
  28/01/2005
Points
  266

VIP Member
9th November, 2008 at 07:51:59 -

Actually I inherited it from my deceased great-uncle in law.

 
Image
http://www.kevinhaag.ca
   

Post Reply



 



Advertisement

Worth A Click