Quick Textbox help

  • Thread starter Bryan Dickerson
  • Start date
B

Bryan Dickerson

I have been told several times that the way I handle entering text and then
the <Enter> key in my programs is the wrong way. The current way I do it is
inherited from ancient times, but it works. When the user enters the text
he wants and then presses <Enter>, I have a WithEvents object that changes
the <Enter> to a <Tab> with the SendKeys command which then invokes the
LostFocus event where all my code is. I don't want to change the way it's
done while I'm still in VB6, but with VB.Net, I would like to move it to a
better way, if there is such a thing. Does anyone have any suggestions?

TIA!
 
D

Dhaval Faria

ya <Enter> key miss it a lot.. heh. but tab is also nice one.. well, what
you are doing is correct, but you can do it by another method.. instead of
doing sendkeys, just detect the <Enter> key, which I am sure you are doing,
and then pass the focus to the next control instead of using sendkeys.

hope this helps.
 

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

Top