473,664 Members | 3,028 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Working online

Hello group,

I need to know the best and best responsive way to determinate is a windows
form (or the desktop computer) is online (access to internet).

I particularly interested for a quick check.

TIA

MajorTom
Nov 16 '05 #1
4 2224
You can make an HTTP Request for instance and see if you get a response.
http://www.knowdotnet.com/articles/a...ynccradle.html
http://www.devbuzz.com/content/zinc_...tivity_pg1.asp

Although the last method I reference in each article is used in reference to
determining if a PDA is cradled, the first example in each article shows you
how to use the HTTP Request - but you can use many similar approaches. A
more direct approach though involves P/Invoking IsDestinationRe achable if
you are comfortable P/Invoking stuff (and if you aren't - trust me, there's
nothign to be afraid of)
[DllImport("sens api.dll")]
private extern static bool IsDestinationRe achable(string dest,IntPtr ptr);

bool HasConnectivity =
IsDestinationRe achable(www.msmvps.com/WilliamRyan,IntPtr.Zero);

--
W.G. Ryan MVP Windows - Embedded

Have an opinion on the effectiveness of Microsoft Embedded newsgroups?
Let Microsoft know!
https://www.windowsembeddedeval.com/...ity/newsgroups
"MajorTom" <m.********@NOv erizon.net.do> wrote in message
news:u3******** *******@tk2msft ngp13.phx.gbl.. .
Hello group,

I need to know the best and best responsive way to determinate is a windows form (or the desktop computer) is online (access to internet).

I particularly interested for a quick check.

TIA

MajorTom

Nov 16 '05 #2
Thanks, I use the P/Invoking , I trust you.

now a few questions:

Is my application dependable of something more than the framework when I use
the [DllImport("sens api.dll")] ?

Is there a way to get a respond more rapid, I know that I have to wait for
the timeout. How that works ?

Thank very much for your response

Major Tom

"William Ryan eMVP" <do********@com cast.nospam.net > wrote in message
news:e$******** *****@TK2MSFTNG P10.phx.gbl...
You can make an HTTP Request for instance and see if you get a response.
http://www.knowdotnet.com/articles/a...ynccradle.html
http://www.devbuzz.com/content/zinc_...tivity_pg1.asp

Although the last method I reference in each article is used in reference to determining if a PDA is cradled, the first example in each article shows you how to use the HTTP Request - but you can use many similar approaches. A
more direct approach though involves P/Invoking IsDestinationRe achable if
you are comfortable P/Invoking stuff (and if you aren't - trust me, there's nothign to be afraid of
[DllImport("sens api.dll")]
private extern static bool IsDestinationRe achable(string dest,IntPtr ptr);

bool HasConnectivity =
IsDestinationRe achable(www.msmvps.com/WilliamRyan,IntPtr.Zero);

--
W.G. Ryan MVP Windows - Embedded

Have an opinion on the effectiveness of Microsoft Embedded newsgroups?
Let Microsoft know!
https://www.windowsembeddedeval.com/...ity/newsgroups
"MajorTom" <m.********@NOv erizon.net.do> wrote in message
news:u3******** *******@tk2msft ngp13.phx.gbl.. .
Hello group,

I need to know the best and best responsive way to determinate is a

windows
form (or the desktop computer) is online (access to internet).

I particularly interested for a quick check.

TIA

MajorTom


Nov 16 '05 #3
Another option is to use InternetGetConn ectedState() API. Refer to this for
a simple example:
http://www.c-sharpcorner.com/Code/20...Connection.asp

HTH.

"MajorTom" <m.********@NOv erizon.net.do> wrote in message
news:u3******** *****@tk2msftng p13.phx.gbl...
Hello group,

I need to know the best and best responsive way to determinate is a windows
form (or the desktop computer) is online (access to internet).

I particularly interested for a quick check.

TIA

MajorTom

Nov 16 '05 #4
Thanks I will have it in my arsenal

MajorTom

"Shiva" <sh******@onlin e.excite.com> wrote in message
news:Oj******** ******@TK2MSFTN GP12.phx.gbl...
Another option is to use InternetGetConn ectedState() API. Refer to this for a simple example:
http://www.c-sharpcorner.com/Code/20...Connection.asp

HTH.

"MajorTom" <m.********@NOv erizon.net.do> wrote in message
news:u3******** *****@tk2msftng p13.phx.gbl...
Hello group,

I need to know the best and best responsive way to determinate is a windows form (or the desktop computer) is online (access to internet).

I particularly interested for a quick check.

TIA

MajorTom

Nov 16 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
1826
by: Hardy Wang | last post by:
Hi: Is it possible for me to create/open web application from remote machine other than port 80? And create application directly under virtual web site instead of creating a virtual directory? Because there is a developing server in our company running IIS with multiple web sites, each one has its own port number. In real scenario, no applications will run under virtual directory, but directly under a site. Thanks!
6
14448
by: Mark Olbert | last post by:
The doPostBack javascript functioning is not submitting the page when called by linkbuttons (or an autopostback checkbox, for that matter). I'm aware of a problem with Netscape browsers and the postback code, but I have a workaround for that installed (and it looks like the code generated by ASP.NET when it renders the page does the same thing, namely, setting document<). However, the problem still exists under firefox. Has anyone come...
8
2516
by: jojobar | last post by:
Okay, I am trying to do is to test the webresource in 2.0 1. I created a new project with assembly name (and default assembly name) "Office". 2. I added the following to the AssemblyInfo.cs file (present under the Properties folder of the project) 3. Now I created a file called test.js on the root folder of the project,
6
11552
by: Matt Frame | last post by:
I have a client that has asked us to get a digital signature certificate and start digitally signing all files we pass between each other. I have heard of the subject and know about the certs but I have no idea how to do something like this with VB.Net. Has anyone done something like this or know where I can find out information how to perform the process of signing a document when sending it then checking one on receipt? Your help is...
4
26695
by: Tomasz Jastrzebski | last post by:
Hello Everyone, I have a GridView control bound to a plain DataTable object. AutoGenerateEditButton is set to true, Edit button gets displayed, and RowEditing event fires as expected.
4
2623
by: moondaddy | last post by:
I'm trying to databind a dependency property in a custom control (CenterX) to the Line.X1Property property of line. If I can correctly do this (and the same for the 'Y' props) then when I drag my custom control the line should follow it (stay connected) I know the dependency props in my custom control work OK because all works OK when I do this in xaml, but when I try to set it up at run time via c# in the codebehind, the line does not...
3
1011
by: jayasabari | last post by:
Hai, I am using .net to develope the web site. i am storing the images to one folder and reteriving. It is working in local system but not working in online. If i connect to online form my system it is working but from other system is not working.Can u give any suggestion. With Regards, K.Jayasabari.
3
4005
by: TS | last post by:
I am using IE 7. I have a website running on my local machine (localhost) and auto complete doesnt work for any of the textboxes, but going to web sites on the internet does support this so i know the browser has this config turned on. any ideas why it doesnt work on my local web application (.net 2)? thanks
5
14513
by: =?Utf-8?B?UVNJRGV2ZWxvcGVy?= | last post by:
I am trying to get the DNS name of an arbitrary IP address on the network. If I use GetHostEntry as the documentation suggests I only get the name of the machine I am running the code on. All other IP’s returns the IP in the HostName property of the IPHostEntry object returned by GetHostEntry. If I use Dns.GetHostByAddress or Dns.Resolve I get the name, but these are marked as obsolete. What is the correct way to get this...
6
1408
by: =?Utf-8?B?RGFuaWVs?= | last post by:
Hi, I'm building a site with Visual Studio 2008 utilizing ajax extension. The page works fine on IE7/FireFox, but on IE6, each action on the page will cause an entire page refresh. Basically the ajax isn't working at all. Some controls from the ajax control toolkit are also used. Does anyone know what's the trick in this issue? Thanks.
0
8348
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8778
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8636
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7375
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6187
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5660
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4185
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2003
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1759
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.