I am a college student taking a intro to programming C#. That being said,
We have created a form that asks for various input.
Once you click the “calculate” button, the program checks the input fields for correct format. If it is incorrect, it creates an error.
How would I create a input dialog box (like that of VB) without using a reference to VB?
Is this even an efficient way to accomplish this?
Is there a way to check input while it is being entered into the form, before clicking the “calculate” button?
I have spent a reasonable amount of time trying to solve this. I am not just jumping to ask a question.
Thanks for your help.
SUBCAN (maybe should be… subcan’t… hehe)
Create a Windows Form with all the required input fields, you have a choice of using MaskedTextBox controls to validate or creating normal TextBox controls with ErrorProvider control (see below for links). Launch the form as a modal dialog box.
http://msdn.microsoft.com/en-us/library/system.windows.forms.maskedtextbox.aspx
http://msdn.microsoft.com/en-us/library/system.windows.forms.errorprovider.aspx
http://www.codeproject.com/KB/dotnet/ErrorProviderComp.aspx
http://msdn.microsoft.com/en-us/library/aa984358(VS.71).aspx