AdvancedHMI Software
General Category => Support Questions => Topic started by: joko markono on June 18, 2020, 12:05:18 AM
-
Hi All, i'm trying to represent an equipment using the AHMI. it has few rotating parts as shown in attachment.
I've tried using animating picture box with each rotating parts using each box. but unfortunately, it doesn't allow image overlay (the bottom image cannot be seen). please let me know how can I solve this.
-
I've found some helps from this link.
https://www.advancedhmi.com/forum/index.php?topic=645.msg2945#msg2945
https://www.advancedhmi.com/forum/index.php?topic=585.msg2550#msg2550
now my problem is how to maintain the position of the box as I intended in the designer (as in first image).
second image shows the result when I ran the application.
-
You could just write some code as well.
https://docs.microsoft.com/en-us/dotnet/api/system.windows.rect.offset?view=netcore-3.1
-
I found a simple solution without needs to write a new code from scratch (ofcoz it is best if you can).
I can add as many as I want by doing this:
Private Sub MainForm_Load(sender As Object, e As EventArgs) Handles MyBase.Load
AnimatingPictureBox1.Controls.Add(AnimatingPictureBox2)
AnimatingPictureBox2.Controls.Add(AnimatingPictureBox3)
AnimatingPictureBox3.Controls.Add(AnimatingPictureBox4)
End Sub
in order to do so, all sizes of AnimatingPictureBox must be the same as the GroupPanel.
Play around with the ImageRotationScale, ImageTranslateX and Y to position the image you want to show.
-
here is a sample using 4x AnimatingPictureBox (the needles) inside a GroupPanel (gage background).
second attachment is for my reference on the point of rotation. both values must be equal.
-
There are also RotatingImage controls that could possibly be used:
https://www.advancedhmi.com/forum/index.php?topic=1429.0
-
thanks Godra. but I would prefer the AnimatingPictureBox as it can be controlled in x and y axis for my application.