Author Topic: Oval shape as AHMI control  (Read 10499 times)

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Oval shape as AHMI control
« on: March 04, 2015, 08:16:40 PM »
Posting these OvalShape controls for those who might find them useful (there are also a LineShape control which can be found in the "Feature Request" category and a RectangularShape control found in this category).

Just add both attached files as Existing Items to 'Purchased Controls' folder and rebuild the project.

The control can respond to 2 PLC addresses, one to change the ellipse line color and the other to change the ellipse fill color.

Check the attached picture for demo.

I have set minimum line width to 2 and maximum to 20, so if you need any different just change either (might cause distortions and weird shapes).
« Last Edit: March 28, 2015, 11:39:45 PM by Godra »

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: Oval shape as AHMI control
« Reply #1 on: March 07, 2015, 04:08:43 PM »
Here is improved version which includes linear and path gradients as well as hatch brushes.

If manipulated properly then this control could be used as LED light or just a decoration on the form.

Some properties are specific and will work only for particular option (example would be HatchStyle and LinearGradient).

There is a couple of HatchStyle entries which appear multiple times in the drop down list (these were automatically populated and I am not currently sure if they can be removed).

This version has minimum line width set to 0 and maximum to 60, so if you need any different just change either.

And if you might need a border around it, that option is included as well.
« Last Edit: March 10, 2015, 12:30:29 AM by Godra »

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: Oval shape as AHMI control
« Reply #2 on: March 21, 2015, 07:14:34 PM »
This is the latest version, with properties re-grouped and made expandable, with instant control refresh at Design Time.

The border also has additional option of changing color for each side of the border.
Each side of the border can also respond to a bit from a PLC.

For those who would like to see Pacman on their form, there are also Arc and Pie shapes which can be selected under the 'EllipseFillType' property (which provides overall control of the ellipse fill options). Pacman is just a funny example of what can be done with these 2 shapes.
« Last Edit: October 29, 2017, 02:11:20 PM by Godra »

robkwan

  • Newbie
  • *
  • Posts: 44
    • View Profile
Re: Oval shape as AHMI control
« Reply #3 on: July 22, 2015, 11:55:42 AM »
I added MyOvalShape.vb and MyOvalShapeHMI.vb to the PurchasedControls folder.
 
VS prompted this error.

Error   1   'InitializeComponent' is not declared. It may be inaccessible due to its protection level

The same error for the Rectangle shape.

Comment out InitializeComponent() in new seems to work.

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: Oval shape as AHMI control
« Reply #4 on: July 22, 2015, 02:21:43 PM »
You are correct.

I just added the designer file to my previous post and that should prevent that error.
The designer file was also added to the Rectangle shape topic.

If the error still pops up then other users can just follow your instruction.
« Last Edit: July 22, 2015, 02:31:38 PM by Godra »

robkwan

  • Newbie
  • *
  • Posts: 44
    • View Profile
Re: Oval shape as AHMI control
« Reply #5 on: July 22, 2015, 03:28:41 PM »
The designer file fixed the error. Thanks

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: Oval shape as AHMI control
« Reply #6 on: September 19, 2015, 03:47:20 PM »
This control has been updated.

HatchStyle issue mentioned previously has been corrected.

The control now includes both TrackBar and NumericUpDown controls inside the properties.

MyOvalShape.vb is a Windows Forms control and MyOvalShapeHMI.vb inherits from it and is AHMI control used to communicate with a PLC.

* Edit: Also attached is post-V399a control as of February 28, 2016 *
« Last Edit: March 02, 2016, 02:41:34 PM by Godra »

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: Oval shape as AHMI control
« Reply #7 on: November 20, 2017, 11:03:06 PM »
Attached here is the AHMI standalone border-less version of the OvalShape control (it doesn't require any of the previous files).

It now also allows for the Arc and Pie fill shapes to have symmetry and rotate (animation).
« Last Edit: March 31, 2020, 02:08:07 AM by Godra »

Phrog30

  • Guest
Re: Oval shape as AHMI control
« Reply #8 on: November 21, 2017, 08:33:57 AM »
Godra, if you have time, check out the application I linked in this thread, http://advancedhmi.com/forum/index.php?topic=1896.msg10810#msg10810, it has a basic shape control that has PLC properties as well.  I showed it to Archie and was hoping he would look at it for possible integration into his base app but he didn't bite.

James

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: Oval shape as AHMI control
« Reply #9 on: November 21, 2017, 11:56:24 AM »
Having any additional shape controls only provides more choices for users.

There are some other shape controls available on the web as well.

joko markono

  • Full Member
  • ***
  • Posts: 132
    • View Profile
Re: Oval shape as AHMI control
« Reply #10 on: March 25, 2020, 04:12:26 AM »
I just tried the control. there is an error as in photo after i added the files as in photo.
replaced CommComponent to ComComponent and all work fine.

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: Oval shape as AHMI control
« Reply #11 on: March 31, 2020, 12:59:41 AM »
Using the border-less version of the control might be a better choice.

« Last Edit: March 31, 2020, 02:12:54 AM by Godra »