Results 1 to 6 of 6

Thread: Ok.. went from vb6 to vb2005..

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2005
    Posts
    22

    Unhappy Ok.. went from vb6 to vb2005..

    .. where did add components go? I think I've looked everywhere. How do you use things like the winsock control now? I liked VB6's add component.. tell me its still somewhere, just hidden.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Ok.. went from vb6 to vb2005..

    Have you noticed the ToolBox on the left-hand side of the IDE? That's where all the commonly used controls and components are placed for your convenience. Double-click one and an instance will be added to your form. There's no WinSock as that's an old VB6 COM component that has been replaced by the System.Net.Sockets namespace. If you want to add a COM component to your form you can still do it but you'll have to add it to the ToolBox first. I'd recommend against using something like WinSock that has a superior replacement. of course there will be a learning curve but that's to be expected. Also, there's a couple of free eBooks available from Microsoft for VB 2005 for VB6 developers. See my signature for links.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Oct 2005
    Posts
    22

    Re: Ok.. went from vb6 to vb2005..

    thanks for the quick and informative reply! I don't see the component you mention offhand but I'll keep looking.

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Ok.. went from vb6 to vb2005..

    You misunderstand. There is no component in the ToolBox that directly replaces the Winsock control. The System.Net.Sockets namespace has various member classes including the Socket class. You can create instances of the Socket class and others in your code to perform various network related tasks, but theyt are not components so they cannot be accessed from the ToolBox. As for those components that you used in VB6, forget them as they are long gone. VB 2005 is a long way removed from VB6 and every control or component will be different. There are some that will resemble controls you used in VB6, like the ComboBox and TextBox, but they are not the same. They are all 100% .NET controls and any resemblence to what you used in VB6 is just a bonus. My advice to anyone learning VB.NET coming from VB6 is to forget VB6 altogether. The syntax will feel familiar but you should make no assumptions about anything working the same way as it did in VB6. If something happens to work the same then consider that a bonus but if you are looking for things to be the same it will just hinder your uptake of VB.NET. Assume that it is a new language and treat it as such and you will learn much faster. One of the biggest changes for many is the switch to genuine OOP. I'd recommend reading from the link below before proceeding.

    http://www.startvbdotnet.com/oop/default.aspx
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  5. #5
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Ok.. went from vb6 to vb2005..

    Note also that the 2003 101 Samples contains an example of using sockets in a client/server chat application. I'd suggest that you take a look at it if you want to use sockets. There may be an equivalent in the 2005 101 Samples but if not th2005 IDE will simply convert the 2003 project.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  6. #6
    Old Member moeur's Avatar
    Join Date
    Nov 2004
    Location
    Wait'n for Free Stuff
    Posts
    2,712

    Re: Ok.. went from vb6 to vb2005..

    Here is a pair of classes you can use for client server apps
    http://www.vbforums.com/showthread.php?t=390875

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