Toflidium.com Articles

Making your own internet connection.

By Toby Allen
Tuesday, April 20, 2004

Found out something useful today.

I'm writing an application at the moment that needs syncronisation between a website and a desktop application.  Everythings going fine, but I wanted to allow my users to connect to the web from within my application if they are not connected when they go to syncronise. This is a nicer solution rather than expecting them to be connected, or set up the connection themselves.

After a bit of searching on google, and then MSDN, I found what I was looking for.

 

// uses wininet;
// to connect call
InternetGoOnline(pchar('http://www.toflidium.com'),form1.handle,0);

 

Thats all you need, just call this function with a url (typecast as a pchar), the handle of your mainform, and a 0, and the windows connection dialog is displayed.

 

 

 

About Us | Site Map | Contact Us | ©2003 Toby Allen - Toflidium Software