. Net built-in errorprovider Control Handler

Source: Internet
Author: User

(Domestic version)



In the past, we always tried to show "Data Statistics... In fact,. NET is already largeProgramThe internal problem is solved; that is, the internal errorprovider is used to control the internal control of the table where the internal problem occurs.

The following is a simple application using the errorprovider program:

' Textbox1 controls the volume content

If   Not   Isnumeric (Textbox1.text) Then

' Display textbox1 to control the response content

Errorprovider1.seterror (textbox1, " Data cannot be written. Please input the number (from zero to zero )! " )

' Move mouse cursor to textbox1 control cursor

Textbox1.focus ()

' Select All textbox1 to control worker content

Textbox1.selectall ()

Else

' Clear textbox1 and control the response content.

Errorprovider1.seterror (textbox1, "" )

End   If


Each time textbox1 controls that the content of the cursor is not a number, errorprovider will display a small and dynamic screenshot (Red exclaimation icon) in textbox1 to control the cursor. The edited response message will be displayed in the tooltips of the small album. Do you think it is much better than MessageBox? At least the user does not need to press the return key or move the mouse to close the MessageBox!

Use this to control the ingress... Not very difficult... It may be worth a try. If you lose it, you will not suffer any losses ~

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.