Question Can make something like this?

ZeroInCo

New member
Joined
Aug 13, 2010
Messages
1
Programming Experience
Beginner
i just want to make a program with first form to enter the serial if correct just continue to form2 if incorrect just a popup say like " Serial Incorrect "

how i can make it ?

Thank you

(Beginner)
 
Yes VB.Net can do this.

Make a form (ex: SerialChecker), add a TextBox, and probably a couple buttons. Add code the Load, and button events. And next thing you know you have an application.
 
An easy way would be to use a dialog form. Design your main form. Then design the form that will allow the user to enter the serial number.
1) Create a form with a Textbox to enter the serial number. Name the form SerialForm
2) In your new form, create a property
Public Property Serial As String
Get
Return Textbox1.text
End Get
Set(ByVal value As String)
TextBox1.Text = value
End Set
End Property
3) Put 2 buttons on the form. In the properties window, make Text = "OK" change DialogResult to DialogResult.OK
on the other button, change text to "Cancel" and Dialog Result to DialogResult.Cancel
4) Open your main window and in the form.load event put the following code
Dim checkSerial As Boolean = True
While checkSerial
Dim fm As New serialForm
If fm.ShowDialog = Windows.Forms.DialogResult.OK Then
If fm.Serial = "12345" Then checkSerial = False
Else
End
End If
End While

Now when you run your program with your main form as the start up, before it displays it will open a dialog form asking for the serial
There is a loop. If the user enters an incorrect serial, you main for reopens the dialog. If the serial is correct, the loop stops and your main
form continues to load. Of course you can send an incorrect message by using a label on the serialForm or you could use a message box if you wanted. You can also change the logic to check the serial. This is just a short example
 
Back
Top