Access Keys for Tab Control in VB.NET

  • Thread starter Thread starter Pooja
  • Start date Start date
P

Pooja

Hi guys,

I have been struggling with this problem for quite a sometime now.
Before a state down my problem wanna give an exmaple:

1. Open a MsWord document.
2. Open the Page Setup dialog box.
3. Navigate using the tab key in the entire dialog box. Use Ctrl+Tab
to navigate between the tab page.

We are successful in doing so. The dialog has 100% keyboard support.

Now the problem. Create the same dialog box in VB.NET. With tab page
control. Provide access keys to the controls. Run the project.
Navigate using the tab key. It works. But use CTRL+TAB keys to
navigate between the tab pages ..u cant!!!!

Please gimme solutions to provide keyboard support for tab controls.
 
Now the problem. Create the same dialog box in VB.NET. With tab page
control. Provide access keys to the controls. Run the project.
Navigate using the tab key. It works. But use CTRL+TAB keys to
navigate between the tab pages ..u cant!!!!

Welcome to the life of a developer! Windows does a lot of things for you,
but this isn't one of them; you'll have to supply the functionality
yourself.
Please gimme solutions to provide keyboard support for tab controls.

Set the KeyPreview property of the form to True and then handle the
Form_KeyDown event to see if the user is pressing Ctrl+Tab. Then switch to
the next tab.
 
Thanks Jeff. Need one more gavor, as i have just migrated from VB6 to
VB.NET, i m not familiar with changes. I m not able to find the
Form_KeyDown event for the form. It was easire in VB 6.:( It would be
great if you could provide me with the code. Thanks in advance.
 
Thanks Jeff. Need one more gavor, as i have just migrated from VB6 to
VB.NET, i m not familiar with changes. I m not able to find the
Form_KeyDown event for the form. It was easire in VB 6.:( It would be
great if you could provide me with the code. Thanks in advance.

Assuming you're using Visual Studio, drop down the combo box on the left
side of the code window. You'll see your form's name and below it you should
see (<form name> Events). Click that and then find the event in the
right-side combo box.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top