Hi all,
I've a little problem to how manage a TCP client exception. I've declared a client in Form1 as described below:
Public Class Form1
'
Public IDEA As New TcpClient("192.168.1.21", 502)
Public Premium As Device.ModbusIpMaster = Modbus.Device.ModbusIpMaster.CreateIp(IDEA)
I want to manage the Exception (ie when my client is offline) by Try..Catch, but unfortunally inside Form1 I can't.
How can I bypass this problem?
Thanks a lot who reply to me
Stefano
I've a little problem to how manage a TCP client exception. I've declared a client in Form1 as described below:
Public Class Form1
'
Public IDEA As New TcpClient("192.168.1.21", 502)
Public Premium As Device.ModbusIpMaster = Modbus.Device.ModbusIpMaster.CreateIp(IDEA)
I want to manage the Exception (ie when my client is offline) by Try..Catch, but unfortunally inside Form1 I can't.
How can I bypass this problem?
Thanks a lot who reply to me
Stefano