Home > Back-end >  How to remove the broken network after continuous jump out "connection failure" form? It&#
How to remove the broken network after continuous jump out "connection failure" form? It&#

Time:10-03

Program USES some ado connection control, and a timer control (every few seconds interval), normally open computers and log on the Intranet applications, is normal, but once the LAN, or computers disconnecting, program will keep out of the "connection" form, too annoying, how the article only once "connection failure" of the form (or simply don't jump after unplugging)?

CodePudding user response:

If you can check the network connection, if not connected the timer is set to false

CodePudding user response:

Program to write their own, it is not difficult to get rid of a box...

CodePudding user response:

reference 1st floor abclm response:
you can check whether the network connection, if not connected to the timer is set to false


Can you give an example, very thank, I stupid, rookie

CodePudding user response:

With the Try statement,
In the Timer event plus a Try, if there is abnormal, will the Timer set to False,

CodePudding user response:

If not well, the code is as follows:
If not Form1. ABC. Connected then
The begin
Timer1. Enabled:=false;
End
The else
The begin
Timer1. Enabled:=true;
end;
Or
If not adoquery1. Active then
The begin
Timer1. Enabled:=false;
End
The else
The begin
Timer1. Enabled:=true;
end;
Seems doesn't work!!!!!!!!!!!!!!!

CodePudding user response:

Continue to jump "connection failure" window,

CodePudding user response:

In a word to determine whether a network unicom
 
USES WinInet;

Procedure TForm1. Button1Click (Sender: TObject);
The begin
If InternetGetConnectedState (nil, 0) then ShowMessage (' connected ');
end;

CodePudding user response:

The original poster notice knot rate, improve the enthusiasm of you to answer the question
  • Related