Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form navigation and data entry
Message
 
To
21/12/2009 12:52:11
General information
Forum:
ASP.NET
Category:
Forms
Environment versions
Environment:
C# 3.0
Miscellaneous
Thread ID:
01440046
Message ID:
01440451
Views:
30
>I'm having VFP withdrawal symptom while programming Winform Data Entry forms.
>Here are a few questions:
>-Is there some convenient way that I'm missing to have the focus proceed to the next tab index when the Enter key is hit, as it does in VFP? I can see how program it by trapping the keydown event, but is there a simpler way?
>-Is there some way to limit the number of characters keyed, as we can do with an input mask?
>-Is there some way to make the characters show as uppercase, as we can do with an input mask? I can make it upper OK, but I'd like the user to see it transformed to upper the way we can with VFP. Again, I can probably do it in the keydown event, but is there a simpler way?
>-Is there some way to handle decimal input the way VFP does? I tried the masked textbox and it seems kludgey to me.
>
>I checked around the C# forums but most of them think that the way C# does it out of the box is great.
>
>Any ideas greatly appreciated.

There is a format property for the textboxes, which is the easiest way to format currency, upper case, etc. For the decimal places, you may find that it's easier to get SQL Server to do the formatting for you, if that's what you're using on the back end.

There's a View->Tab Order on the menu that will let you set the tab order. If you want to specifically set the focus to another control, the easiest thing is to do that from the Validated method and use this.SetFocus(controlname). If your question is about using the ENTER key, rather than the TAB key, to advance to the next control, you will definitely need to trap the key stroke. You may want to subclass a form control and handle it there.
Linda Harmes
HiBit Technologies, Inc.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform