tabbing 
Author Message
 tabbing

Hi.  In Windows, you have to hit the tab key to move between controls.
Is there a way to perform the same action using the Return/Enter key
without much coding?  I know you can code it by using SendKeys, but that
can get messy.  BTW.  It's not me... the users want it that way.

Thanks,
Bich (bic)



Sun, 11 Nov 2001 03:00:00 GMT  
 tabbing
Bich

First, ensure you don't have a default button on your form (normally OK
would be set as default).

Set the KeyPreview property of the form to True.

In the Form_KeyDown event, monitor for a KeyCode = vbKeyReturn. If not, just
exit. If found, get the TabIndex of the ActiveControl and then find the
control with the next highest TabIndex (or rotate back to the first), make
KeyCode = 0 and then SetFocus on the next control.

The inspection of the controls could be wrapped up in a utility procedure
that takes a form as an argument.

--
Regards
{*filter*}

Remove '!no!spam!' to reply by e-mail.

Quote:

> Hi.  In Windows, you have to hit the tab key to move between controls.
> Is there a way to perform the same action using the Return/Enter key
> without much coding?  I know you can code it by using SendKeys, but that
> can get messy.  BTW.  It's not me... the users want it that way.

> Thanks,
> Bich (bic)



Mon, 12 Nov 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Moving Between Tabs in a Tab Control

2. Need VBA to Search for Tabs, Replace with Default Tabs

3. changing color of tab header of tab pages

4. tab control - order of tabs

5. Tab control in VB dot net shuffling his tabs

6. Prevent multiline tabs from moving up and down on a tab page

7. Adding Tabs To Tab Control

8. How to select Tab Control tab page programmatically?

9. Tab Control Tab Visible

10. Masked Edit COM control appears only on first tab page of tab control in VB.NET

11. Tab Control - Remove Tab

12. tab bars do not match tab page

 

 
Powered by phpBB® Forum Software