Solved

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

Posted on 2003-10-23
4
252 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
  • 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

744 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now