|
If you want to connect to multiple hosts at the same time it may be simpler to just use multiple sockets, maybe in an array.
you can't forget something you never knew...
"Watching Migthy Joe Young made me hate my life..................................I want a gorilla!" A. Havemann
|
|
|
|
|
thx for your reply
but i m using a DLL that contains Connect....
all what i am asking how to delay the program
Note : i m not conneting to mutiple host in the same time...
i m doing this in a sequence,one after another
thx
Regards
Ramy
|
|
|
|
|
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
|
|
|
|
|
Dear evilnoodle
You are my hero,,,
i guess the functions is workin by now,,,
ot helped me a lot
thx again ,will tell u details later on ..
Regards
Ramy
|
|
|
|
|
in my project i would like to take the values if they satisfy the condition for example if type rate 250 then it will show lot number (4,5) rates are 100,150 like that how to do is there any other way
|
|
|
|
|
I'm not even sure what you're asking, but it sounds straightforward to me. That is, it sounds like you're describing a basic business rule ( albeit not very well ). What do you need to know ?
Christian Graus - C++ MVP
|
|
|
|
|
I need code to find the matching of those numbers now i want to know is it possible to use one data reader over multiple commands
|
|
|
|
|
hi
I created a program in VB 6.0 with MS SQL and Crystal Report 8.0.1.0 on Win 2000 Adv
In network systems are WIN XP
when i instaled this program in other xp systems
and My MS SQL database is located on a remote server
this error apeared
connection error and ...
my code is:
Set cn = New Connection
cn.CursorLocation = adUseClient
cn.ConnectionTimeout = 60
cn.Open "Provider=SQLOLEDB.1;Integrated Security=SSPI ;Persist Security Info=False;User ID=;Initial Catalog=db2;Data Source=10.0.0.128"
Set rstel = New Recordset
Dim ST As String
ST = "SELECT distinct city FROM table2 "
rstel.Open ST, cn, adOpenForwardOnly,adLockReadOnly
please help me
-- modified at 3:22 Thursday 23rd November, 2006
|
|
|
|
|
How to use progress bar in vb.net
how to customize it...........
ahmad.osama1984@gmail.com
|
|
|
|
|
progree bar usage is the same as vb6
Max,Min and value are properties that you need more.
other properties and their work are available in MSDN
what do u mean by "customize"?
the best way to customize a control is making a new one.
or a class inherited from that control
|
|
|
|
|
move from one cell to anather cell it shoud display incremented value by 5 at runtime in the second cell of datagrid
Ganesh
|
|
|
|
|
Do u want to ask anything?
Mubashir
Every job is a self portrait of the person who did it.
|
|
|
|
|
in datagrid, While tab key press it should increment by 5 (of the value in current cell}into the next cell how?
|
|
|
|
|
good day again everyone....
anyone of you can help and ur help is very highly appreciated.
how to get a value from an array, to display the result to in the textbox control.
ex: tempArray()
textbox1.text = tempArray() ''' this code produces error
anyone can help me with this... pls i need your help very badly.... th:-Dank you
nothing is impossible.....
|
|
|
|
|
HEHEHEHE i already got it... thank you for your attemp... it just came up to my mind....
tnx tnx tnx
nothing is impossible.....
|
|
|
|
|
hi,
how to use Excel as backend.
i have to save each days information into one Excel file.
ie. entering name, age,address and phone no fields and when we click save button all these fields saved in one Excel file. one Excel file for each day
can u help me
|
|
|
|
|
you have to quit excel file after you click Save
XLapplication.quit
and using a loop u have to change its name
e.g.
i+=1
excelfileName= "File"&str(i)
|
|
|
|
|
I used the code below, but it not work for RichTextBox
Dim selStart As Integer
Dim srchMode As Microsoft.VisualBasic.CompareMethod
Try
selStart = InStr(rtbSource.Text, txtFind.Text, srchMode)
If selStart = 0 Then
MessageBox.Show("Can not find """ & txtFind.Text, "Khmer Web Browser", MessageBoxButtons.OK, MessageBoxIcon.Information)
Exit Sub
End If
rtbSource.Select(selStart - 1, txtFind.Text.Length)
rtbSource.ScrollToCaret()
Catch ex As Exception
End Try
................
|
|
|
|
|
|
I'm trying to save Outlook 2003 Calendar attachments in my local drive using VB.NET but without success.
Can any one help?
Thanks
Sbr
|
|
|
|
|
Hi guys,
Am writen an application that the result for the form is preview with crystal report. In crystal report I create a OLE DB connection to the database. when I deploy the application it is looking report database on the machine that it was develope. example of code:
Dim path1 As String = My.Application.Info.DirectoryPath '' path
'' change path of the database
report.DataSourceConnections.Item(0).SetConnection("", "" & path1 & "\db.mdb", False)
review and give me ur feed back, even it there is a better way to bind the report i would gladly accept
thanks
|
|
|
|
|
At design-time put all your reports and mdb file into your application folder and make sure you access them using "Application.Startuppath" or ur "Application.Info.DirectoryPath" during development.
Ensure that you package all your reports and mdb file into the application folder (as hidden file preferably) during deployment.
Let me know hoow this helps u.
cheers
S.S.O
|
|
|
|
|
am not sure if i understand what is happen but some how all u guys advice i have tried. can u plz tell me how to bind a crystal report to visual studio 2005, when the crystal connect to the database via OLE DB.
Thanks
Ricky
|
|
|
|
|
I don't think the issue of connection engine matter if your application is using same connection to the database.
create a new form say frmCrystal and add the CrystalReportViewer control on the form. Don't set the reportsource as design but set ur Reportsource at runtime to the report you want to display.
example:
Private Sub frmCrystal_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
rptViewer.ReportSource = Application.StartupPath & "\rpt.rpt"
End Sub
All the best.
SSOnuh
|
|
|
|
|
How could I make a transparent button so that it is not shown in a vb. net form, but I should be able to click it on its current position?
cezzzar
|
|
|
|