|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Enter Key vs. Tab KeyIn my data entry forms, I want to treat the Enter key on text box as though
the user has pressed the tab key and jump to the next control. In VB6 I would do this by using the SendKeys "{Tab}" routine. What is the best practice for Visual Basic .NET? Well , we just set the keypreview of the form to true and what do you think
?? we catch the enter key and send a tab with sendkeys ... :-) as you see not so much has changed regardsMichel posseth [MCP] Show quoteHide quote "Michael Cook" <MichaelC***@discussions.microsoft.com> schreef in bericht news:182A316F-9D07-4997-AA23-34AB981C4F98@microsoft.com... > In my data entry forms, I want to treat the Enter key on text box as > though > the user has pressed the tab key and jump to the next control. In VB6 I > would > do this by using the SendKeys "{Tab}" routine. What is the best practice > for > Visual Basic .NET? What about my text boxes with multiple lines that I don't want to interpret
the ENTER key as the TAB key. I think the KEYPREVIEW will be global on the form? Is there a Microsoft recommended method? I thought in VB6 using SendKeys as this solution was not encouraged by Microsoft. - Michael Show quoteHide quote "Michel Posseth [MCP]" wrote: > Well , we just set the keypreview of the form to true and what do you think > ?? we catch the enter key and send a tab with sendkeys ... > > > :-) as you see not so much has changed > > regards > > Michel posseth [MCP] > > > "Michael Cook" <MichaelC***@discussions.microsoft.com> schreef in bericht > news:182A316F-9D07-4997-AA23-34AB981C4F98@microsoft.com... > > In my data entry forms, I want to treat the Enter key on text box as > > though > > the user has pressed the tab key and jump to the next control. In VB6 I > > would > > do this by using the SendKeys "{Tab}" routine. What is the best practice > > for > > Visual Basic .NET? > > > Well , you can code around the mentioned issue ( boolean flag wether to
send the tab or not ) about the in VB6 not encouraged thingy afaik was this because the need of an API to perform a sendkey in VB.Net it is part of the framework in my opinion you only have 2 options 1. code the behavior that you want 2. use the controls out of the box and live with there habits and limitations regards Michel Show quoteHide quote "Michael Cook" <MichaelC***@discussions.microsoft.com> schreef in bericht news:E68ED773-8996-404D-81E6-8B84B680188C@microsoft.com... > What about my text boxes with multiple lines that I don't want to > interpret > the ENTER key as the TAB key. I think the KEYPREVIEW will be global on the > form? Is there a Microsoft recommended method? I thought in VB6 using > SendKeys as this solution was not encouraged by Microsoft. > > - Michael > > "Michel Posseth [MCP]" wrote: > >> Well , we just set the keypreview of the form to true and what do you >> think >> ?? we catch the enter key and send a tab with sendkeys ... >> >> >> :-) as you see not so much has changed >> >> regards >> >> Michel posseth [MCP] >> >> >> "Michael Cook" <MichaelC***@discussions.microsoft.com> schreef in bericht >> news:182A316F-9D07-4997-AA23-34AB981C4F98@microsoft.com... >> > In my data entry forms, I want to treat the Enter key on text box as >> > though >> > the user has pressed the tab key and jump to the next control. In VB6 I >> > would >> > do this by using the SendKeys "{Tab}" routine. What is the best >> > practice >> > for >> > Visual Basic .NET? >> >> >>
Upgrading Access 97 application to dotNet
Changing Color of Textbox on Hover Best Approach When Saving a New Project Manage DataBase For loop variable date No Response Redirect but something like Response Forward? How do you start an assembly dynamically with constructors Disable sort on specific columns with VB.NET datagrid SyncLock Required? Changing Color of TextBox on Hover - With Correct Examples!!! |
|||||||||||||||||||||||