Question open close form from class

nomi_nomi

New member
Joined
May 28, 2011
Messages
2
Programming Experience
Beginner
hi friends, i am developing client-server app. i want to hide the opened form and open the another form when i recive the commnd from server. the client side has two form and one class.
code(this code execute when i recive the msg):

Sub messagerecieved(ByVal message As String)
Dim msg() As String = message.Split("|") ' if a message is recieved, split it to process it

Select Case msg(0) 'process it by the first element in the split array

Case "CHAT"
Form1.Show() ' it work with showdialog
Form2.hide()
End Select

thx, waiting for you solutions
 
Back
Top