Click here to Skip to main content
15,892,809 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i want to display an error on testing if my two textboxes are empty on winform.
I dont know if the mbox is an better option .so can i use the balloon for the display of error message or there is some other better method to do that .
Posted

1 solution

It's a odd question to try and answer - it depends on when you want to check, and what you want to happen.
Normally, you would check when they press the OK button or similar (or better, disable the OK button until the entries are valid)

But, if you do that then showing a message means cancelling the OK action - which isn't difficult, but can be unexpected, and intrusive.

What are you trying to achieve with the check? When do you need to apply it? How critical is it? Should it disrupt the user input? All these things depend on what your form will be used for: if it is data entry, then errors at the end can be more friendly, since data entry workers don't look at the screen when they enter data. And so on.
 
Share this answer
 
Comments
Shahin Khorshidnia 19-Jun-12 11:38am    
+5
gaurish thakkar 19-Jun-12 23:50pm    
Yes it is for data entry only.like checking if the field is blank or not .

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900