|
-
Oct 11th, 2000, 10:18 AM
#1
Thread Starter
Hyperactive Member
I would like to know if it's possible to use a Winsock control without putting it on the form. I tried the following:
Public wskConnection As Winsock
Then I would normally use wskConnection, but I get an error as soon as I try to access one of its properties (Object vairable or with block variable not set).
Is there a solution to this? Thanks.
-
Oct 11th, 2000, 11:04 AM
#2
Fanatic Member
I had this in my notes... its the best I can do
I is for formless creation of the MScomm control
Figure it will get you pointed in the right direction
dim C1 as Object
set C1 = CreateObject("MSCommLib.MSComm")
Kurt Simons
[I know I'm a hack but my clients don't!]
-
Oct 11th, 2000, 11:12 AM
#3
Addicted Member
Hi !!!
If you using VB6 (VB5 i didn't know), set a reference to the MSWINSCK.OCX
don't forget to catch the events
Private WithEvents wskConnection As Winsock
and initialize the winsock with new
Set wskConnection = New Winsock
cu
-
Oct 17th, 2000, 06:00 AM
#4
PowerPoster
> Set wskConnection = New Winsock
i think that wouldnt work...
-
Oct 17th, 2000, 06:44 AM
#5
Addicted Member
Hi Fox !!!
Believe me, it works. if you want an example reply.
-cu TheOnly
-
Oct 17th, 2000, 06:47 AM
#6
PowerPoster
Yes please, Im currently trying this and it just doesnt work...
-
Oct 17th, 2000, 09:30 AM
#7
Thread Starter
Hyperactive Member
What do you guys do with Winsock?
I am currently having some problems with Winsock, maybe one of you guys can help me out.
I copied some code from the forum that showed how to use the Winsock control. It was using 2 winsock controls. If I remember right one of them was for LISTENING and the other one for the data connection (downloading, uploading, etc). Is this necessary? (using 2 winsock control)
Also, I have been able to download a 90bytes text file straight to a variable, but when I try downloading a 247kb file to the hard disk, it downloads from 220kb to 240kb and never finish the file succesfully.
If you are using the winsock, like me, to download a binary file from an ftp site, please give me some code example, I really need it!
I posted the following thread regarding this problem: http://forums.vb-world.net/showthrea...threadid=34730
Thank you very much
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|