Using VB to check for a Computer online
Morgan;
There are two ways you can use VB to check for another computer being online. But first, as you already figured out, you need some fixed reference such as ICQ since you have a dynamic IP address.
Method #1: Write an ActiveX User Control, embed it in an HTML page, and open the page using IE4 or higher. The ActiveX User Control has an native method named AsyncRead and event named AsyncReadComplete. Give AsyncRead the fully-qualified URL to your home PC's ICQ online status page and AsyncType = vbAsyncTypeByteArray. In AsyncReadComplete AsyncProp.Value will contain a byte array of the targeted web page. You may have to run the byte array through the following code to make it legible;
<%
Dim sValue as String
sValue = ""
For i1 = LBound(AsyncProp.Value) To UBound(AsyncProp.Value)
sValue = sValue & Chr(AsyncProp.Value(i1))
Next i1
%>
Now parse the raw HTML text in the variable sValue to find the online status indicator for your home PC.
Method #2: Create a Standard EXE project with a single form. On that form add the Internet Transfer Control. On FormLoad or by explicit command (button click) initialize the properties of the INET control and invoke the OpenURL method targeting your home PC's ICQ online status page. Once you have the raw HTML you can parse it for the information you want, same as method #1. You mention a firewall at your office. If it also acts as a proxy and not just a filter, be sure to set INET.AccessType = icUseDefault. This will cause the control to evaluate your work PC's registry for the proxy server settings it needs to get through.
Let me know if this helps or you encounter any problems. I can probably help you out.
Regards,
Larry
([email protected])