Results 1 to 12 of 12

Thread: Winsock + Multiple Forms = Trouble *Resolved*

Threaded View

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2005
    Location
    Everywhere
    Posts
    41

    Resolved Winsock + Multiple Forms = Trouble *Resolved*

    Hello all!
    This is my first post here. I've been a member of the community for a couple days now but I've been finding pretty much everything I need through searching the forums so I haven't had a need to post until now. I'm new to Visual Basic. I just installed and started using Visual Basic 6.0 about a week ago and I've been having loads of fun learning and experimenting.

    I'm currently working on making a chatting program with the help of Winsock. It's all been going pretty good so far but I've hit a road block. I've searched all over the forums and on Google as well. I have found nothing related to my particular situation thus far.

    Anyway, I'll stop boring you all now and get to my question.

    I think my question will be easy for you VB Veterans but for me it's a mind-blower.

    My question is, how can I continue a Winsock connection started in one form on another form? Right now I have two forms. One is called frmLogin and the other is called frmMain. As you can probably guess by the name, frmLogin comes up first when the program first starts. It requests a username and IP address from the user. Then it attempts to connect. I use this as validation. If it can connect then they are let through to frmMain but if it can't connect then they receive an error asking them to try again. So far so good. Everything that I have said so far works how it should.

    Now for the problem area. If they supply correct info then they are transfered to frmMain which is the actual chat program. Now for the life of me, I can't figure out how to transfer that connection to frmMain where it is needed. I need it so it connects on frmLogin and they can chat on frmMain.

    How can I transfer that connection so it can be used on frmMain? Is it possible? Thanks for any and all help.
    Last edited by Jick; Mar 11th, 2005 at 11:03 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width