Using shortcuts and Regular Expression

  • Thread starter Thread starter =?iso-8859-9?B?x2lua28=?=
  • Start date Start date
?

=?iso-8859-9?B?x2lua28=?=

Hi,

I want to use shortcuts such as F6 or F7 to do something. When i apply event to a blank form, it works well. But if there are some controls on the form like textbox or something else, they are selected automatically, so form events doesn't work :(
(There is one way i know to do that, to add unvisible menu items and give them shortcuts but i think it is not a good programming)

And my other problem, is there any Regular Expression Editor inside of VB editor?? Can i find already defined regular expression in anywhere??

Thank you so much...
 
Set the form's KeyPreview property to True and try?

Hi,

I want to use shortcuts such as F6 or F7 to do something. When i apply event
to a blank form, it works well. But if there are some controls on the form
like textbox or something else, they are selected automatically, so form
events doesn't work :(
(There is one way i know to do that, to add unvisible menu items and give
them shortcuts but i think it is not a good programming)

And my other problem, is there any Regular Expression Editor inside of VB
editor?? Can i find already defined regular expression in anywhere??

Thank you so much...
 
Shortcuts works. Thank you Shiva..

But now, there are some new problems. After i apply keypreview=true, and
keyboards events i couldn't fill textbox properly.. It starts to clears text
inside of textboxes frequentl out of my control. If i set keypreview=false,
events doesn't work but textbox problem disappears.

Do you have any idea?

Thanks..
 
Hi,
What KeyPreview=True does is that it gives the form a chance to handle the
keyboard events before they are sent to the relevant controls (textbox,
etc). So, probably the form-level keyboard handler code is causing the
problem?
If you want to handle certain keys at the form-level and don't want them to
pass to other controls, set the Handled property of the eventhandler
parameter (KeyPressEventArgs or KeyEventArgs) to True.

Shortcuts works. Thank you Shiva..

But now, there are some new problems. After i apply keypreview=true, and
keyboards events i couldn't fill textbox properly.. It starts to clears text
inside of textboxes frequentl out of my control. If i set keypreview=false,
events doesn't work but textbox problem disappears.

Do you have any idea?

Thanks..
 

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