A simple way for a windows form. Create the form(LoginForm) with the textboxes, set the password mask on one of them, and labels you want, an OK button and a Cancel button.
In the LoginForm properties set the Accept Button and Cancel Button properties appropriately.
Double-click the OK button to add the event handler, and see the code stub. In here you do validation of the inputs from the textboxes. If the validation is good set the DialogResult property of the login form to DialogResult.OK. If it fails set the DialogResult to DialogResult.Cancel.
In your calling form, declare a form of your login form type(i.e. LoginForm NewLogin = new LoginForm();)
Declare a result variable of type DialogResult. Initialize it with the ShowDialog() method of the new login form(i.e. DialogResult Result = NewLogin.ShowDialog();). If the result is OK the login is valid.
If you need the login username to be persistent, you can use a global variable, and set it in the login form.
oops ran out of time. I uploaded a template. If you copy the zip file to My Documents\Visual Studio 2010\Templates\Item Templates, it will load into your new items list. One thing I overlooked was setting the password mask.
Write a C program that should create a 10 element array of random integers (0 to 9). The program should total all of the numbers in the odd positions of the array and compare them with the total of the numbers in the even positions of the array and indicate ...
I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...