Quick text box help

  • Thread starter Thread starter Bryan Dickerson
  • Start date 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 class 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!
 
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 class 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?

Please don't crosspost between .NET and non-.NET groups. Since this question
is specifically about VB.NET, please use the *.dotnet.* groups only.
 
Hi Bryan,

I think this you can better place in the newsgroup

microsoft.public.dotnet.languages.vb

Not only for the how, because I think that if you want to do it that, than
is the way you do it now should not have to change much, but also for the
discussion if you are taking the right approach now.

Which is in my opinion more a general discussion, but I do not know if this
kind of things is discussed in the vb.general.discussion group.

I am sure that you will get an answer in the newsgroup I pointed you on.

I hope this helps,

Cor
 
brrrrrrrrrrrrrrr
Not only for the how, because I think that if you want to do it that, than
is the way you do it now should not have to change much, but also for the
discussion if you are taking the right approach now.
Not only for to know how you can do it in code, but more for the discussion
which approach to take, "the enter and the tab" or only the "tab".

I think that the method you use now for your should not necessary change.
 
The pressing of Enter should be the activation of a command button that has
its default property set to true. This should normally dismiss the form. In
an ideal application, everything that can be done with the mouse should also
be able to be done with the kbd.
 
it's not *completely* about .NET, it's about porting VB6 code to .NET. But
you're right in that that's .NET's issue!
 
Back
Top