|
-
Aug 15th, 2000, 02:25 PM
#1
Thread Starter
New Member
I am building a system that uses the Winsock control for net comms, but may want to use other controls for subsequent releases. Because of this, I would like to build a "shell" class around the Winsock control, so that if I later decide to use some other control, I can make all of my changes in the "shell" class only.
The problem is, I can't figure out how to reference the Winsock control in a class. I can Dim a variable as Winsock, but cannot reference that variable without a runtime error. Is there something I am missing?
-
Aug 15th, 2000, 04:39 PM
#2
Lively Member
Ive tried instancing a winsock control at runtime and I cant get it to work either. Tried lots of different way. I dont think you can do it. You can only set your class level winsock object to one that is already on a form.
-
Aug 15th, 2000, 04:48 PM
#3
Thread Starter
New Member
Winsock
Thanks for the information...that is the conclusion I have reached also. So, if I include my winsock "shell" class module in some VB project, then I must separately include the .frm file where the winsock control resides? Not exactly what I wanted.
-
Aug 15th, 2000, 04:51 PM
#4
Monday Morning Lunatic
Use
Dim WithEvents m_wsock as Winsock
in a class module, and see what happens.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
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
|