Im running a small server that seems to work fine outside the IDE as an exe,
but within the IDE, when I run the program for the first time, i can
start/stop
the host many times. But I end the program within the IDE, and start it back
up,
when I click on the Host button, the entire IDE hangs.
I created a quick test program to try and figure out where the problem was..
Basically i created a form and put a command button, and a mswinsock
control on the form. The subs below is what I was using.
Run this the first time, and I can Host/Stop Host several times.
But if I stop running this in the IDE, and restart it in the IDE, once I
click on the
command1 (Host) button, the entire IDE hangs once it gets to Winsock1.Listen
I've tried changing it so that Winsock1 does not have an index, and it
doesn't help either.
I've tried reinstalling the mswinsck.ocx and reregistering it, but it didn't
help.
Any Ideas?
Private Sub Command1_Click( )
If Winsock1(0).Sta te <> sckClosed Then Winsock1(0).Clo se
If Command1.Captio n = "Host" Then
Command1.Captio n = "Stop Host"
Winsock1(0).Loc alPort = 6570
Winsock1(0).Lis ten
Else
Command1.Captio n = "Host"
End If
End Sub
Private Sub Form_Load()
Command1.Captio n = "Host"
End Sub
but within the IDE, when I run the program for the first time, i can
start/stop
the host many times. But I end the program within the IDE, and start it back
up,
when I click on the Host button, the entire IDE hangs.
I created a quick test program to try and figure out where the problem was..
Basically i created a form and put a command button, and a mswinsock
control on the form. The subs below is what I was using.
Run this the first time, and I can Host/Stop Host several times.
But if I stop running this in the IDE, and restart it in the IDE, once I
click on the
command1 (Host) button, the entire IDE hangs once it gets to Winsock1.Listen
I've tried changing it so that Winsock1 does not have an index, and it
doesn't help either.
I've tried reinstalling the mswinsck.ocx and reregistering it, but it didn't
help.
Any Ideas?
Private Sub Command1_Click( )
If Winsock1(0).Sta te <> sckClosed Then Winsock1(0).Clo se
If Command1.Captio n = "Host" Then
Command1.Captio n = "Stop Host"
Winsock1(0).Loc alPort = 6570
Winsock1(0).Lis ten
Else
Command1.Captio n = "Host"
End If
End Sub
Private Sub Form_Load()
Command1.Captio n = "Host"
End Sub
Comment