exiting or closing the application

svibuk

Active member
Joined
Jul 15, 2008
Messages
31
Programming Experience
1-3
i have a windows application which needs to close or shut down if a key value is incoorect
i have a class file with below code
and this classs file is called inthe windows form
VB.NET:
Expand Collapse Copy
While dr.Read
            If Not mkey = dr("kcode").ToString Then
                MsgBox("Invalid key", MsgBoxStyle.Information, "System message")

exit sub
            End If
        End While

if the key value is incorrect i get the msg but the application doesnot close.
it proceeds furthher

i need to end the application if incoorect key
 
Back
Top