Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

well yeah ok, now I want to make sure that I am connected to the internet before I perform any actions

 

I have been on dial up for about 2 months nearly, and its average as, but meh, its all bout money...

 

SO.

 

i want to bring up the internet connection dialog after I check to see that there is no internet connection.

 

how do i do this ?

 

Shell("rundll32.exe rnaui.dll,RnaDial " & sName, 1)

 

is for win 9x, but for xp, any ideas ?

 

cheers

Posted

re:

 

shell still works in vb.net and xp

On Error Resume Next
       Dim myProcess As Process = System.Diagnostics.Process.Start("c:\data\test.txt")
       MessageBox.Show(myProcess.ProcessName)

Posted

yes, i know shell still works,

 

but rnaui.dll does not exist in xp. I know i could download it, but like thats just dumb, so i want to find what produces the dialog in xp :)

 

and how to check to see if an internet connection is active...

  • *Gurus*
Posted

There is no proper way to accurately check the internet connection status of a computer. I've kept my eyes open for a solution for years now, and I haven't seen one that works as it should-- reliably. And, if you think about it, the nature of networks, this really isn't suprising.

 

With that said, there are a few Win32 API functions that you may want to take a look at:

 

[api]InternetGetConnectedState[/api]

[api]InternetGetConnectedStateEx[/api]

[api]IsNetworkAlive[/api]

Posted

Yeah I had seen examples of those used in some places, and just pretty much copied the code they provided, but it never seemed to work - I will have to play with them myself for a bit D:

 

API calls are things I wanted to avoid, at least for a bit, but if .NET hasnt got any other way either I will look at those...

 

now is there anyway to bring up the connection dialog though?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...