I m using the following code to connect to Internet

Code:
ret = InternetDial(form1.hWnd, RasConn(0), 0&, 0&, 0&)
the problem is that if IE is in offline mode the Internet dialer window doesn't pop up how could i fix that

thnks