|
-
Jan 19th, 2010, 03:17 PM
#1
Thread Starter
Junior Member
Please test this
Very first app, Let me know if it works good.
Public Class Form1
Dim r As New Random
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Label1.Text = "0"
Label1.Text = r.Next(1, 20).ToString
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If TextBox1.Text = Label1.Text Then
MsgBox("You guessed right!")
Else
MsgBox("You guessed wrong!, Please guess again")
Label1.Text = r.Next(1, 20).ToString
End If
End Sub
End Class
There is the source.
Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|