Hello All:
I am developing a client/server application using vb.net winsock programming.
I am sending data to Server and at the same time receive the incoming data from the server.
My application have 3 Windows Forms.
1-FrmInquiry
2-FrmSale
3-FrmBalance
When i send and receive data from FrmInquiry to server it works fine but
My problem is when i go to any other form(ex FrmSale) from FrmInquiry and send data from it to server, it gives error.
but When i run the form FrmSale directly it works fine.
I tried it through Closing socket at Form Unload and initialize its port and IP settings again but no luck.any suggestion?
Another thing is when i close the server & client application and then run it again the FrmInquiry form send data successfully
but again it gives error when i goto FrmSale Form.
How can i send data from one form to another
My code is:
//code for FrmInquiry Form in Load event
tcpclient.remot eport=3000
tcpclient.remot ehost="192.168. 0.10"
tcpclient.conne ct
tcpclient.sendd ata("salman")
dim obj as new FrmSale
obj.show
me.hide
//Code for FrmSale Form in Load event
tcpclient.remot eport=3000
tcpclient.remot ehost="192.168. 0.10"
tcpclient.conne ct
tcpclient.sendd ata("salman")
dim obj as new FrmSale
obj.show
me.hide
//code for frmServer Form in Load event
tcpserver.local port=3000
tcpserver.liste n
//Accept connection request
//Get incomng request from client
Regards:
Danish Majid
I am developing a client/server application using vb.net winsock programming.
I am sending data to Server and at the same time receive the incoming data from the server.
My application have 3 Windows Forms.
1-FrmInquiry
2-FrmSale
3-FrmBalance
When i send and receive data from FrmInquiry to server it works fine but
My problem is when i go to any other form(ex FrmSale) from FrmInquiry and send data from it to server, it gives error.
but When i run the form FrmSale directly it works fine.
I tried it through Closing socket at Form Unload and initialize its port and IP settings again but no luck.any suggestion?
Another thing is when i close the server & client application and then run it again the FrmInquiry form send data successfully
but again it gives error when i goto FrmSale Form.
How can i send data from one form to another
My code is:
//code for FrmInquiry Form in Load event
tcpclient.remot eport=3000
tcpclient.remot ehost="192.168. 0.10"
tcpclient.conne ct
tcpclient.sendd ata("salman")
dim obj as new FrmSale
obj.show
me.hide
//Code for FrmSale Form in Load event
tcpclient.remot eport=3000
tcpclient.remot ehost="192.168. 0.10"
tcpclient.conne ct
tcpclient.sendd ata("salman")
dim obj as new FrmSale
obj.show
me.hide
//code for frmServer Form in Load event
tcpserver.local port=3000
tcpserver.liste n
//Accept connection request
//Get incomng request from client
Regards:
Danish Majid