[Solved] MsgBox (YesNo) If User Loses connection before click in a button

Answered
0
0

Please,  What happens when   in VB.NET if app show a YesNo Msgbox to user and before he click in a button he loses the Internet connection.

  • You must to post comments
Best Answer
0
0

I think I got the answer,

While testing this example: http://demo.wisej.com/ColumnFilter

I disconnected my network cable and I gave this message: “The network is down, retry?”

 

  • You must to post comments
0
0

So if he clicks Yes (or No) while disconnected from the Internet, is there a way to tell him that he is disconnected and pass some instructions?

 

  • You must to post comments
0
0

Nothing happens, if the user regains the connection before the session expires they will find the same messagebox and can continue working. If the session expires, the thread will be aborted and nothing after the MessageBox is executed – unless you have a generic try/catch/finally wrapping the messages box, in which case code in the generic catch or finally will execute.

If you have the try/catch/finally, you can check for ThreadAbortException and ignore it. ThreadAbortExceptions cannot escape the try/catch/finally block. See https://docs.microsoft.com/en-us/dotnet/api/system.threading.threadabortexception?view=netframework-4.7.2

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.