Hi,
I've posted my code to try and explain myself better, although its not
correct and i realise this cos i've chopped bits out to make things
easier to read.
Basically in start.vb, frmapplication should only open when the
conditions X and Y are 1.
So i tried to wait for Y to be 1 before proceeding to X, by means of a
DO UNTIL Y = 1, but this doesnt seem to work and causes the program to
crash.
can anyone suggest a better way of doing this?? all I want to do is
halt the flow of sub main() until Y = 1. is there a means to halt in
VB.net? or a better way of doing this??
Thanks
David
'''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''start.vb''''' '''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''''''''
Module startup
Public Class Accepted
Public Shared Y As Integer
Public Shared X As Integer
End Class
Public Sub main()
register.Show()
Do Until Accepted.Y = 1
Loop
If Accepted.X = 1 Then
register.Close()
Application.Run(frmapplication)
Else
MsgBox("Invalid Registration Key", MsgBoxStyle.Critical,
" ")
End If
End Sub
End Module
'''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''
'''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''register.vb'' '''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''
Public Class B
Private Sub Continue_Click() Handles Continue.Click
If validate() = true then
Accepted.Y = 1
Accepted.X = 1
Else
MsgBox("Invalid Registration Key", MsgBoxStyle.Critical, "
")
End If
End Sub
end Class
'''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''