IP number and connection

Can somebody please tell me how to read the IP number of my computer with vb6 and how to verify if the connection with internet is on?
thanks

Comments

  • : Can somebody please tell me how to read the IP number of my computer with vb6 and how to verify if the connection with internet is on?
    : thanks
    :
    Put a WinSock control in your form. Then query its LocalIP proerty. That's you IP address.

    If you want to check internet connectivity, just use a web site as a becnhmark. Tell the WinSock control to connect to ... Google, for example, like this:
    [code]
    WinSock1.Connect "www.google.com", 80 'Port 80 is for HTTP
    [/code]

    If you have the Error event firing, then you most probably don't have internet connection. If, however, the Connect event fires, thn you have successfully connected to the internet. Don't forget to Close the connection to Google, using the Close method of the WinSock.

    Hope I helped,
    Nikolay Semov

  • : : Can somebody please tell me how to read the IP number of my computer with vb6 and how to verify if the connection with internet is on?
    : : thanks
    : :
    : Put a WinSock control in your form. Then query its LocalIP proerty. That's you IP address.
    :
    : If you want to check internet connectivity, just use a web site as a becnhmark. Tell the WinSock control to connect to ... Google, for example, like this:
    : [code]
    : WinSock1.Connect "www.google.com", 80 'Port 80 is for HTTP
    : [/code]
    :
    : If you have the Error event firing, then you most probably don't have internet connection. If, however, the Connect event fires, thn you have successfully connected to the internet. Don't forget to Close the connection to Google, using the Close method of the WinSock.
    :
    : Hope I helped,
    : Nikolay Semov
    :
    :
    Where can I find the winsock control? What's the exact name?
    However, many thanks.

  • : Where can I find the winsock control? What's the exact name?
    : However, many thanks.
    :
    The full name is "Microsoft Winsock Control ".

    Or, you can hit the browse button and get %SYSDIR%mswinsck.ocx.

    Hope I helped,
    Nikolay Semov

  • :
    : : Where can I find the winsock control? What's the exact name?
    : : However, many thanks.
    : :
    : The full name is "Microsoft Winsock Control ".
    :
    : Or, you can hit the browse button and get %SYSDIR%mswinsck.ocx.
    :
    : Hope I helped,
    : Nikolay Semov
    :
    :
    Well, I don't think this is normal but, ... I don't have this file. Is it possible to download it anywhere?

  • : Well, I don't think this is normal but, ... I don't have this file. Is it possible to download it anywhere?
    :
    Happens. A resintall of Visual Studio 6 (VB only is enough) will bring it back. In this sense, you can try searching in the .CAB files on the first CD.

    Or... just do a Google search on "mswinsck.ocx download" That's how I restored my copy after it misteriously vanished.

    Hope I helped,
    Nikolay Semov

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories