Hi Guys,
I am developing a small app just to check our servers are still online, at the moment i have got the my.computer.net work.ping pinging 12 of our servers and changing a label to say either server online or server offline, i am trying to get this to happen every 15 seconds, i have tried loops etc but it freezes the app, i came across application.doe vents which enabled the form to load without freezing. I was wondering if someone knows of a better way of doing this without the app freezing.
Cheers!
Jay!
4 1363 Plater 7,872
Recognized Expert Expert
Use the System.Threadin g.Timer object.
Hi Guys,
I am developing a small app just to check our servers are still online, at the moment i have got the my.computer.net work.ping pinging 12 of our servers and changing a label to say either server online or server offline, i am trying to get this to happen every 15 seconds, i have tried loops etc but it freezes the app, i came across application.doe vents which enabled the form to load without freezing. I was wondering if someone knows of a better way of doing this without the app freezing.
Cheers!
Jay!
Hi Jay,
It probably "freezes" the app because you are doing everything from the main thread - the one that also manages the GUI. Have you tried making the pings in seperate threads?
Regards.
Hi Guys!
I have tried playing with the Use the System.Threadin g.Timer object and it seemed unsuccessful. I have moved the ping code into a sperate function and am calling the function from the form load, the first ping works fine, the app takes a little time to load but when i loop the code after a timer etc.. the app freezes until the loop has continued, this is not an issue if all i was going to do was loop the code but i wish to do more with the app and i cannot allow it to freeze, any suggestions guys! and thanks for your input so far, very useful learning for me!
Regards
Jay!
Plater 7,872
Recognized Expert Expert
Well the System.Threadin g.Timer is different then the other timer object, this one actually creates/runs in its own thread. If you tried that Timer (not the timer you drag/drop on the GUI designer) and it didn't work, you might have to go with full on threads.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Jason Rodman |
last post by:
I have downloaded every example on how to create a ping utility in .Net in
both VB and C#, but have been disappointed with the results. I have YET to
find an example that returns consistent results that are even close the the
actual ping command line utility. For example:
If i would ping the same server over and over, some pings would come back in
0 milliseconds, others would come back in 15, but never in between. It would
always jump...
|
by: Ed |
last post by:
I've attached some VB.NET code I've hacked together (some taken from
MS examples & newsgroup postings) that will perform a ping or
IcmpSendEcho using the icmp.dll (see this for more info:
http://support.microsoft.com/default.aspx?scid=kb;en-us;170591 ).
The problem I have is in order to perform a discovery/ping of an
entire subnet (192.168.1.* for instance) I have to do a FOR loop to
itterate through all of the addresses. That it seems...
|
by: scotty |
last post by:
I need to do a ping scan of a subnet.
I can Enum through the IPs and do this, but it takes over 5 minutes as
I can only create 1 process at a time. Does anyone know how I can
create multiple Ping Processes so as to send out 255 pings at once?
(sort of a reverse ping flood).
FYI: using the " -n 1" switch with Ping will cause it to only send 1
ping.
Basicly the code is:
|
by: Neel |
last post by:
I am trying to "ping" a remote host in my C++/Redhat Linux code to
check whether that host is connected or not.
if (0 == system("ping -w 2 192.168.0.2))
But, in both cases (connected/disconnected), system call returns 0. Can
someone please show what I am doing wrong? How to check the actual
result of the ping status using C++ on Redhat linux ?
Thanks in advance.
|
by: luvwknd |
last post by:
Hi all,
I am attempting to utilize MS's article I.D. #828993 found at:
http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B828993
In an effort to create a GUI Ping utility that ultimately will show me via a
green indicator if a system is pingable and a red indicator if a system is
not pingable. In addition I want to be able to ping a range of addresses at
one time and have the program return my indicators.
| |
by: Deepak |
last post by:
I am programing a ping application which pings various centers . I
used timer loop and it pings one by one.
Now when i finish pinging one center it should wait for the
ping_completed function to be executed and then continue pinging
another certer.
The ping_completed function is called on completion of ping by the os
and i have no control on it .
|
by: Krish |
last post by:
All,
I have an offline application that works online for some data
syncronization. For data syncronization I access a webservice. I want
to show whether my application is online or not by checking whether
the application is able to access the webservice.
If the webservice is accessible, the application is online. otherwise
it is offline
What is the best way to ping a url in C# ?
|
by: amaccormack |
last post by:
I wrote a quick script to check the "up-ness" of a list of machines,
and timeout after 1 second. However, with a lot of timeouts, the
script takes a logn time, so I thought to parallelise it. However, as
soon as I do, the pings that do not get a response never return, so
their threads block forever and the program hangs. Environment is:
Python 2.3.3 (#1, Jan 5 2005, 15:24:27) on
linux2 (running on SLES9)
pinglist=
|
by: adnanahmed714 |
last post by:
hi
1)
i am using a home network consisting of two computer.on One pc i have Marvell Lan card(built-in on the board) and on the second pc i have BayLan network adapter. What i know if two pc's are on the same network they ping each other easily.But i my case Pc with Baylan ping the Marvell's Pc but Marvell Pc does not ping the BayLanPc.?(ALso used a Switch in between but result is same)
2) i attach a laptop to Marvell'sPc direct and...
|
by: Dave Marden |
last post by:
I currently use this routine in vbscript to ping computers and get the
status of ping to determine whether to try to backup a machine, I am trying
to change it to work with vb2003.net I am wondering if anyone has a ping
function they could share with me.
I have done some searching on this but cannot find anything specifically for
vb2003.
Sub PingComputer
If PingStatus(PCName) = "Success" Then
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
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...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
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...
| |