Results 1 to 3 of 3

Thread: how to check and save Connection Duration on LAN

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2005
    Posts
    2

    Exclamation how to check and save Connection Duration on LAN

    in VB6 i want to create a software in which i want to note down the time duration of any computer that will be connected to the NETwork plz help me in that

  2. #2
    Lively Member
    Join Date
    May 2005
    Posts
    90

    Re: how to check and save Connection Duration on LAN

    Here's search queries you need to use on google and planetsourcecode.com, after that you can piece together what you need.

    ICMP ping (using ping.exe or the likes) - allows you to check if a remote IP is online.

    Timers and arrays of objects... you need to learn to use arrays of objects mostly, since you want to time multiple systems.

  3. #3
    New Member
    Join Date
    Mar 2004
    Posts
    13

    Re: how to check and save Connection Duration on LAN

    i have made quite a big chat program before and how you could do yours is a much simpler way...

    Checking if the computer is there:
    set a timer so when the computer connects to the server the timer is activated, do this by having another timer that gets the winsock state and if its connected (7) then start the other timer so ud have sumthin like

    Private sub_tcheck

    txt_ping.text = wsk_connect.state ' this makes the numeric representation of the winsock state go in the text box
    if txtping.text = "7" then ' if the text box then displays 7 (which is conneted) then the timer to check if the server is there is activated
    tcheck.enabled = false
    tping.enabled = true ' this is the timer that will check the server is there
    else
    msgbox "unabled to connect"
    end if
    end

    and in the tping timer you would have sumthin like

    private sub tping
    on error goto serverend:
    wsk_connect.senddata "" 'so when winsock cannot send data obveosly the server has shut down so this will cause an error and when it does it will go to 'serverend:' and display the message
    serverend:
    msgbox "server has shut down"
    end

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