Inherits System.Windows.Forms.Form 'for random
'add that after public class form 1
Randomize() 'put this in form load
'on button click
Textbox2.Text = CStr(Int(Rnd() * 6)) 'generates a number from 0-6
'now to check if ur input matched random number
if textbox1.text = textbox2.text then
MsgBox("you win")