Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm Controls / February 2005

Tip: Looking for answers? Try searching our database.

How do you "cancel" keystrokes in a WinForms control?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
BBM - 23 Feb 2005 01:45 GMT
Hi everyone,

I'd like to be able to "cancel" keystrokes in a custom textbox (or combobox)
so that the user is unable to enter too many characters for the underlying
databound field.  How?

Thanks.

BBM
Tim Wilson - 23 Feb 2005 04:23 GMT
Does the "MaxLength" property work in your situation?

Signature

Tim Wilson
.Net Compact Framework MVP

> Hi everyone,
>
[quoted text clipped - 5 lines]
>
> BBM
BBM - 25 Feb 2005 14:29 GMT
Yes it does except that that I'd like to have the computer make the
MessageBox "beep" when the user attempts to exceed Maxlength.

I guess I looked in detail at the "Control" properties but not the "TextBox"
or "ComboBox" ones.  Pretty embarassing.  Thanks for the tip.

BBM

> Does the "MaxLength" property work in your situation?
>
[quoted text clipped - 8 lines]
> >
> > BBM
Tim Wilson - 25 Feb 2005 16:00 GMT
Do you mean simply make a sound through the speaker to indicate to the user
that no more text may be entered? If that is the case, then the TextBox and
ComboBox should do that already.

Signature

Tim Wilson
.Net Compact Framework MVP

> Yes it does except that that I'd like to have the computer make the
> MessageBox "beep" when the user attempts to exceed Maxlength.
[quoted text clipped - 16 lines]
> > >
> > > BBM

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.