Form Event Question 
Author Message
 Form Event Question

Hi, I'm not sure if I'm phasing this correctly, but I need the left and
right keys to work like tab and shift tab.. Right now, I'm placing code
and all object on the form in the KeyDown event to handle this, but is
there some global event for the form that applied to every object?
Also, if I want help to appear when F1 is pressed, I would probably
have to do the same thing, right?
Thanks
John

Sent via Deja.com
http://www.*-*-*.com/



Wed, 25 Jun 2003 02:55:54 GMT  
 Form Event Question
The form will have a KeyPreview property you can set to True.
Then put your code in the KeyDown event for the form.
Quote:

> Hi, I'm not sure if I'm phasing this correctly, but I need the left and
> right keys to work like tab and shift tab.. Right now, I'm placing code
> and all object on the form in the KeyDown event to handle this, but is
> there some global event for the form that applied to every object?
> Also, if I want help to appear when F1 is pressed, I would probably
> have to do the same thing, right?
> Thanks
> John

> Sent via Deja.com
> http://www.deja.com/



Wed, 25 Jun 2003 03:32:50 GMT  
 Form Event Question
For the help file, just go to the program properties and set the help Dir,
or in code set:  App.HelpFile = "C:\help.hlp", it automatically detects F1
Quote:

> Hi, I'm not sure if I'm phasing this correctly, but I need the left and
> right keys to work like tab and shift tab.. Right now, I'm placing code
> and all object on the form in the KeyDown event to handle this, but is
> there some global event for the form that applied to every object?
> Also, if I want help to appear when F1 is pressed, I would probably
> have to do the same thing, right?
> Thanks
> John

> Sent via Deja.com
> http://www.deja.com/



Wed, 25 Jun 2003 06:21:42 GMT  
 Form Event Question


Quote:
> For the help file, just go to the program properties and set the help Dir,
> or in code set:  App.HelpFile = "C:\help.hlp", it automatically detects F1


> > Hi, I'm not sure if I'm phasing this correctly, but I need the left and
> > right keys to work like tab and shift tab.. Right now, I'm placing code
> > and all object on the form in the KeyDown event to handle this, but is
> > there some global event for the form that applied to every object?
> > Also, if I want help to appear when F1 is pressed, I would probably
> > have to do the same thing, right?
> > Thanks
> > John

For the rest, check the Form's .KeyPreview property which causes the Form to
see all KeyDown/Up/Press events before the controls.


Wed, 25 Jun 2003 08:03:32 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Form Event Question

2. Windows Form event order question

3. Closing Form's Event Question

4. Form text box event property question.

5. Question on Form Resize event

6. Need help with raising event in New() event in a base form

7. Form close event occurs before lost focus event

8. Why the differences between form events and DHTML events

9. Add Event Code On form Load Event

10. calling the paint event of a form from another form

11. making a mdi form a form during run time with click event

12. Activating an event on a form from another form

 

 
Powered by phpBB® Forum Software