Click here to Skip to main content
16,005,467 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Help in msgbox Pin
Dave Sexton23-Nov-06 1:08
Dave Sexton23-Nov-06 1:08 
AnswerRe: Help in msgbox Pin
ayeleteric23-Nov-06 3:36
ayeleteric23-Nov-06 3:36 
QuestionWindows Desktop application Like Pin
Nuno Chumbo22-Nov-06 22:28
Nuno Chumbo22-Nov-06 22:28 
AnswerRe: Windows Desktop application Like Pin
Christian Graus22-Nov-06 23:12
protectorChristian Graus22-Nov-06 23:12 
Questionwinsock : connectin between 1 client and many remote servers Pin
charchabil0322-Nov-06 22:23
charchabil0322-Nov-06 22:23 
AnswerRe: winsock : connectin between 1 client and many remote servers Pin
MatthysDT23-Nov-06 3:39
MatthysDT23-Nov-06 3:39 
GeneralRe: winsock : connectin between 1 client and many remote servers Pin
charchabil0323-Nov-06 8:14
charchabil0323-Nov-06 8:14 
AnswerRe: winsock : connectin between 1 client and many remote servers Pin
MatthysDT23-Nov-06 20:07
MatthysDT23-Nov-06 20:07 
I don't know your DLL but I assume that in the Connect(Par1, Par2) method, Par2 is the timeout.
What is Par1?

Does sending the "Exit;" command cause your DLL to close the socket? You may want to look for an explicit close() command, to ensure it gets closed.

If you think a delay is all that's required, try the following:


Public Sub connect()
Try
For Each cb As CheckBox In Me.GBBranches.Controls
   wskClient.Connect(cb.Text, 5000)
   MyDelay(1) 'Calls for a 1 second delay before sending "exit;"
   wskClient.Send("exit;")
Next
Catch noCon As Exception
MsgBox(noCon.Message)
'
End Try
End Sub
'
'Here is the code for a method that will cause a delay in seconds, 
'please note this does not make use of the timer control.
'(Just import Microsoft.VisualBasic.DateAndTime & System.Windows.Forms.Application 
'at the top to simplify your code)
'
    Private Sub MyDelay(ByVal x As Long)
        'Allow x seconds to wait for connection
        Dim EndTime As Single
        EndTime = Microsoft.VisualBasic.DateAndTime.Timer + x
        Do
            System.Windows.Forms.Application.DoEvents()
        Loop While (EndTime > Microsoft.VisualBasic.DateAndTime.Timer)
    End Sub

This should do the trick, however i'm not entirely convinced that the delay is what you need, if the DLL's code is available it would be easier to debug.



you can't forget something you never knew...

"Watching Migthy Joe Young made me hate my life..................................I want a gorilla!" A. Havemann

GeneralRe: winsock : connectin between 1 client and many remote servers Pin
charchabil0325-Nov-06 7:56
charchabil0325-Nov-06 7:56 
Questionhelp Pin
Rmesh22-Nov-06 22:08
Rmesh22-Nov-06 22:08 
AnswerRe: help Pin
Christian Graus22-Nov-06 23:11
protectorChristian Graus22-Nov-06 23:11 
GeneralRe: help Pin
Rmesh22-Nov-06 23:22
Rmesh22-Nov-06 23:22 
Questionsql [modified] Pin
fatidarya22-Nov-06 20:39
fatidarya22-Nov-06 20:39 
QuestionProgress bar Pin
GauravAshish22-Nov-06 20:26
GauravAshish22-Nov-06 20:26 
AnswerRe: Progress bar Pin
Taylor Kobani22-Nov-06 20:41
Taylor Kobani22-Nov-06 20:41 
Questioncell to anather cell move auto increment by five in datagrid Pin
kumarganesh22-Nov-06 20:09
kumarganesh22-Nov-06 20:09 
AnswerRe: cell to anather cell move auto increment by five in datagrid Pin
_mubashir22-Nov-06 20:37
_mubashir22-Nov-06 20:37 
GeneralRe: cell to anather cell move auto increment by five in datagrid Pin
kumarganesh22-Nov-06 20:43
kumarganesh22-Nov-06 20:43 
QuestionARRAY Pin
momooomooomomo22-Nov-06 19:00
momooomooomomo22-Nov-06 19:00 
AnswerRe: ARRAY Pin
momooomooomomo22-Nov-06 19:08
momooomooomomo22-Nov-06 19:08 
QuestionExcel + VB.Net Pin
viji]22-Nov-06 17:29
viji]22-Nov-06 17:29 
AnswerRe: Excel + VB.Net Pin
Taylor Kobani22-Nov-06 20:30
Taylor Kobani22-Nov-06 20:30 
QuestionFind Pin
Socheat.Net22-Nov-06 17:21
Socheat.Net22-Nov-06 17:21 
AnswerRe: Find Pin
The ANZAC22-Nov-06 18:05
The ANZAC22-Nov-06 18:05 
QuestionOutlook Calendar Attachments in VB.NET Pin
Sbrmalik22-Nov-06 12:55
Sbrmalik22-Nov-06 12:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.