AdvancedHMI Software

General Category => Additional Components => Topic started by: Godra on March 04, 2015, 08:16:40 PM

Title: Oval shape as AHMI control
Post by: Godra 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).
Title: Re: Oval shape as AHMI control
Post by: Godra 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.
Title: Re: Oval shape as AHMI control
Post by: Godra 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.
Title: Re: Oval shape as AHMI control
Post by: robkwan 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.
Title: Re: Oval shape as AHMI control
Post by: Godra 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.
Title: Re: Oval shape as AHMI control
Post by: robkwan on July 22, 2015, 03:28:41 PM
The designer file fixed the error. Thanks
Title: Re: Oval shape as AHMI control
Post by: Godra 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 *
Title: Re: Oval shape as AHMI control
Post by: Godra 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).
Title: Re: Oval shape as AHMI control
Post by: Phrog30 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 (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
Title: Re: Oval shape as AHMI control
Post by: Godra 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.
Title: Re: Oval shape as AHMI control
Post by: joko markono 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.
Title: Re: Oval shape as AHMI control
Post by: Godra on March 31, 2020, 12:59:41 AM
Using the border-less version of the control might be a better choice.