View Full Version : Alt+f4


danielgraham
10-10-2003, 08:41 AM
I know you can diable the shiht for startup but now i need to know how to disable the ALT F4.

All help appreciated

pdx_man
10-10-2003, 09:35 AM
Using Alt F4 is not an Access routine and cannot be disabled for Access, only. You cannot even use the AutoKeys to bypass it. You would be looking at disabling a Windows function that I would really not advise.

What is your motivation for doing this? Can you not use the OnClose event of a form to do whatever needs to be done before an application closes?

mission2java_78
10-10-2003, 09:56 AM
Originally posted by pdx_man
Using Alt F4 is not an Access routine and cannot be disabled for Access, only. You cannot even use the AutoKeys to bypass it. You would be looking at disabling a Windows function that I would really not advise.

What is your motivation for doing this? Can you not use the OnClose event of a form to do whatever needs to be done before an application closes?

You can disable this in Access.
It only affects the access app running.

pdx_man
10-10-2003, 10:07 AM
Really?

How?

mission2java_78
10-10-2003, 10:14 AM
Originally posted by pdx_man
Really?

How?

You do it at the form level..so it traps the alt f4.

I gather he's just making sure the end user doesnt try to exit out of access using alt f4. I had to do this on a specific application because the application was required to be closed by an event which deleted linked tables from various back ends. We did not want the links (objects themselves) to sit into this database because the data was very critical. Exiting the database prematurely using alt f4 would be a bummer to our process (this was a special case).

Use the keyboard keydown events to catch the alt f4 keys and cancel the operation.

Jon

pdx_man
10-10-2003, 10:17 AM
Ah, very true.

However, if the user has a report with the focus, this will not work. The Alt+F4 isn't truely disabled, it is just captured when in Forms.

Crilen007
10-10-2003, 11:19 AM
You should beable to code that as well.

pdx_man
10-10-2003, 11:39 AM
In the report's OnKey Event ...? :confused:

Uhhhh ...

mission2java_78
10-10-2003, 11:40 AM
Originally posted by Crilen007
You should beable to code that as well.

You can...only if the report doesn't have the focus...
but the report has the focus. There is no key event for the reports.

What are the chances the poster is asking about this based on when a report is open :confused:

Rich
10-10-2003, 11:42 AM
Why doesn't Alt+F4 do anything on my PC?

mission2java_78
10-10-2003, 11:43 AM
Originally posted by Rich
Why doesn't Alt+F4 do anything on my PC?

Cause you're not american :D

Rich
10-10-2003, 11:47 AM
Originally posted by mission2java_78


Cause you're not american :D
Ah, I see, your still using a system I believe was referred to as command prompt

mission2java_78
10-10-2003, 11:48 AM
Originally posted by Rich

Ah, I see, your still using a system I believe was referred to as command prompt

Is forced to

What's your excuse ?

mission2java_78
10-10-2003, 11:49 AM
Originally posted by Rich

Ah, I see, your still using a system I believe was referred to as command prompt

Rich is running access on linux mandrake :p

Rich
10-10-2003, 11:51 AM
Originally posted by mission2java_78


Rich is running access on linux mandrake :p
I wouldn't have to rely on Ctrl Alt Del so much if I was :D

pdx_man
10-10-2003, 12:20 PM
What are the chances the poster is asking about this based on when a report is open
Very good, I'd say. I know my users will open a database just to run one report. They run it, and then close from there. I would say very rarely do they close the DB from the form ...

pdx_man
10-10-2003, 12:31 PM
Linux ... I have a buddy who is anti MS. He spends so much time updating all of the libraries and loading this module and trying to find this thing and that thing. Hours he spends to keep his Linux box up and running. And he's been doing Linux for years. No thanks. I'll hit Ctrl-Alt-Del.

mission2java_78
10-10-2003, 12:33 PM
Originally posted by pdx_man
Linux ... I have a buddy who is anti MS. He spends so much time updating all of the libraries and loading this module and trying to find this thing and that thing. Hours he spends to keep his Linux box up and running. And he's been doing Linux for years. No thanks. I'll hit Ctrl-Alt-Del.

Does it for a reason...like it or not most servers run Linux.
Its stable and doesnt fail on a simple for loop in C++

:D

Travis
10-10-2003, 12:58 PM
Personally I'm holding out for the keyboard that has an electric current that is completed only when the user presses the Alt+F4. :D

pdx_man
10-10-2003, 01:00 PM
Definately on a web server ... only way to go. But for your home PC ... too much trouble.

Getting back to the topic on hand ... I think it is very likely for a user to close using Alt-F4 when looking at a report.

mission2java_78
10-10-2003, 01:05 PM
Originally posted by pdx_man
[B]Definately on a web server ... only way to go. But for your home PC ... too much trouble.



I completly disagree...everything has its use...you think its trouble because you don't know how to use it effectively.

pdx_man
10-10-2003, 01:10 PM
No, I don't use it at all. I'm talking about what I have witnessed from a friend who does PHP programming for a living. He spends hours every month re-building his machine so that he can either load spreadsheets ... enable video players ... play different games.

You're right, I don't know anything about Linux, other than my buddy spends far more time maintaining his computer than I do mine.

That's all.

mission2java_78
10-10-2003, 01:13 PM
Just depends on the situation...he could be rebuilding his kernel, messing around with configuration, maybe he's an 3lit3 g33k.

It's a great stable system that comes with loads of software...i like both winders and nix. If I feel hardcore I'll run X ... if I dont feel hardcore and im sheepish Im all over windows.

Both have their use...of course I do agree personal home use Windows dominates the market.

danielgraham
10-11-2003, 04:04 AM
Im new to this but how would i capture the alt f4 key click to come up with and error message

thanks

pdx_man
10-15-2003, 05:03 PM
Check out tje OnKeyPress event on your form under
Access Help.