Author Topic: Ping Button  (Read 3397 times)

Godra

  • Hero Member
  • *****
  • Posts: 1436
    • View Profile
Ping Button
« on: December 16, 2016, 09:12:21 PM »
This is a button control that allows you to ping a computer.
It supports multiple entries in the form of IPv4 address or a hostname (use the control's IPAddressCollection property to create a list).
Also, check the attached pictures to see what it could look like.

It is related to this topic:

http://advancedhmi.com/forum/index.php?topic=1555.0

and includes Archie's code.

Do report bugs so I can try to fix them.
« Last Edit: December 28, 2016, 09:08:03 AM by Godra »

Darrell

  • Full Member
  • ***
  • Posts: 198
  • Electrician / PLC Technician
    • View Profile
Re: Ping Button
« Reply #1 on: December 16, 2016, 10:16:43 PM »
don't see the control to download

Godra

  • Hero Member
  • *****
  • Posts: 1436
    • View Profile
Re: Ping Button
« Reply #2 on: December 16, 2016, 10:30:12 PM »
Thank you Darrell.

It is now attached in the previous post.

Darrell

  • Full Member
  • ***
  • Posts: 198
  • Electrician / PLC Technician
    • View Profile
Re: Ping Button
« Reply #3 on: December 20, 2016, 01:35:14 PM »
Nice work,   I find it very handy , as I use many of my HMI's for troubleshooting and commissioning work ,

How could a small description be added next to the IP address , so when I right click on the button I can easily tell what the IP's are for.

To go one step further how could I add another IP to the list from a running HMI


Godra

  • Hero Member
  • *****
  • Posts: 1436
    • View Profile
Re: Ping Button
« Reply #4 on: December 21, 2016, 10:31:59 AM »
The descriptive comments feature was added to the control after you downloaded it (so just download it again).

I will have to see if it is possible to use this same control to actually add a new IP from a running HMI.

Darrell

  • Full Member
  • ***
  • Posts: 198
  • Electrician / PLC Technician
    • View Profile
Re: Ping Button
« Reply #5 on: December 21, 2016, 11:22:54 AM »
thank man , keep up the good wolrk

Godra

  • Hero Member
  • *****
  • Posts: 1436
    • View Profile
Re: Ping Button
« Reply #6 on: December 21, 2016, 11:30:06 AM »
The control attached in this post seems to be working fine for adding new IP Address or Hostname (descriptive comments can be used along for as long as the correct comment separators are used <-- defaults are space/slash/slash).

These new entries will be remembered only while the HMI is running.

« Last Edit: January 23, 2017, 07:17:40 PM by Godra »

Darrell

  • Full Member
  • ***
  • Posts: 198
  • Electrician / PLC Technician
    • View Profile
Re: Ping Button
« Reply #7 on: January 23, 2017, 06:31:05 PM »
very  nice , thank you , find I'm using this button quite a bit , the few little things If you add and IP via button , the text box is quite a bit smaller than the text being entered , also Ive found that when you click the button to ping an Ip it would be nice if there was some indication that is doing something , impatient people just keep clicking the button , Ive found this button to be a very useful control

Thanks Darrell

Godra

  • Hero Member
  • *****
  • Posts: 1436
    • View Profile
Re: Ping Button
« Reply #8 on: January 23, 2017, 07:23:13 PM »
The file was updated and replaced in my previous post.

If you are still to have trouble seeing it properly then in the code go to Constructor / Destructor Region, Public Sub New and try manipulating numbers in the following 2 lines:

        Me.AddNewIPForm.Size = New Size(640, 64)  '<-- 640 is the width of the popup form, 64 is the height

        Me.AddNewIPTextbox.Font = New Font("Microsoft Sans Serif", 12, FontStyle.Regular)  '<-- 12 is the size of the font


The button will show "Wait..." after it was clicked and will be disabled until the result shows in the pop up message box.
« Last Edit: January 23, 2017, 07:57:52 PM by Godra »

Darrell

  • Full Member
  • ***
  • Posts: 198
  • Electrician / PLC Technician
    • View Profile
Re: Ping Button
« Reply #9 on: January 23, 2017, 11:23:05 PM »
thanks , that did the trick

Darrell