Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 06-23-2002, 09:51 AM
agent86 agent86 is offline
Senior Member
 
Join Date: Jan 2002
Posts: 1,192
Default Make code universal to all forms?

Delphi 4
Paradox Tables

I want to assign some some function and other non-alphabetic keys to common actions. For example, I want a F5 key press to cause the same action as a navigator prior key press. I want F6 to reflect a navigator next key press. I want F7 to do an Exit button action. F9 to cause a database table insert command.

Can I put the code somewhere so it will apply to all forms in the application? I have looked at action lists, but for some reason I just don't see how to set it up. I have the printed manuals, but I am still confused.

The point is I want all forms to use virtual keys the same way. I know I can put the code in all the forms, but I am trying to avoid it.

Donald Adams
Agent86
Reply With Quote
  #2  
Old 06-23-2002, 10:07 AM
gLes gLes is offline
Senior Member
 
Join Date: Jan 2001
Posts: 2,273
Default RE: Make code universal to all forms?

Just put this line into all the form's OnKeyDown event:

Unit1.Form1.FormKeyDown(Sender, Key, Shift);

First you have to add Unit1 to all the other unit's uses clause...

Hope that helps...

gLes

"If you read your bible you might have seen that it was damnation without relief..."
/Rowan Atkinson/
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 08:22 PM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2017, vBulletin Solutions, Inc.