Solved

Stating an Internet Connection from withing the application (Compact Framework).

Posted on 2003-10-23
4
261 Views
Last Modified: 2012-08-14
Im trying to find information on Stating an Internet Connection from withing the application.
I have looked all over the web for it, What I want to do is start an already existing Internet Connection from withing my application, like Internet Explorer does that when your not connected it pops up the Connection dialog.

I will be using the VisualBasic.Net/Compact Framework for this, if anybody has a link, code or even a hint it would be greatlly appreciated.

Thanks you!
Here are my 250 for this question.
0
Comment
Question by:mirizarry
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 28

Expert Comment

by:iboutchkine
ID: 9609632
System.Diagnostics.Process.Start(sURL)

Is this what you are looking for?
0
 

Author Comment

by:mirizarry
ID: 9609679
Well let me give you a described scenario.

User Open Application.
User wants to synchronize their data but he is not connected to the internet at thea time.
Application Runs synchronization and detects its not connected to the Internet.
Application pops up Intenert Connection dialog for the user to connect.
User clicks con connect and then continues synchronization.
0
 
LVL 28

Accepted Solution

by:
iboutchkine earned 50 total points
ID: 9610091
It looks like you need to check if the user is connected to the internet.

Try this

Imports System.Runtime.InteropServices

<DllImport("wininet.dll")> _
    Public Function InternetGetConnectedState( _
        ByVal lpdwFlags As Integer, ByVal res As Integer) As Boolean
End Function

Public Function InternetConnectionExists() As Boolean
    ' Determines if there is a connection to the Internet.
    ' Note that InternetGetConnectedState cannot be considered
    ' 100% reliable. An issue can occur if an internet connection
    ' has never been configured, the function may return true, even
    ' though there is no internet connection.
    '

    Dim e As Integer = 0
    Dim ret As Boolean = InternetGetConnectedState(e, 0)

    Return ret

End Function


also check this site
http://support.microsoft.com/default.aspx?scid=kb%3ben-us%3b821770
0
 

Author Comment

by:mirizarry
ID: 9610238
Thank You

That it WinInet :P
0

Featured Post

Business Impact of IT Communications

What are the business impacts of how well businesses communicate during an IT incident? Targeting, speed, and transparency all matter. Find out more in this infographic.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question