Author Topic: multi rotating parts representation  (Read 2167 times)

joko markono

  • Full Member
  • ***
  • Posts: 132
    • View Profile
multi rotating parts representation
« 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.

joko markono

  • Full Member
  • ***
  • Posts: 132
    • View Profile
Re: multi rotating parts representation
« Reply #1 on: June 20, 2020, 04:50:38 AM »
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.
« Last Edit: June 20, 2020, 04:56:38 AM by joko markono »

MajorFault

  • Guest
Re: multi rotating parts representation
« Reply #2 on: June 20, 2020, 07:37:11 PM »

joko markono

  • Full Member
  • ***
  • Posts: 132
    • View Profile
Re: multi rotating parts representation
« Reply #3 on: June 21, 2020, 09:54:19 AM »
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.

joko markono

  • Full Member
  • ***
  • Posts: 132
    • View Profile
Re: multi rotating parts representation
« Reply #4 on: June 21, 2020, 09:57:59 AM »
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.
« Last Edit: June 21, 2020, 10:13:03 AM by joko markono »

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: multi rotating parts representation
« Reply #5 on: June 22, 2020, 05:16:15 AM »
There are also RotatingImage controls that could possibly be used:

  https://www.advancedhmi.com/forum/index.php?topic=1429.0


joko markono

  • Full Member
  • ***
  • Posts: 132
    • View Profile
Re: multi rotating parts representation
« Reply #6 on: June 22, 2020, 07:17:08 AM »
thanks Godra. but I would prefer the AnimatingPictureBox as it can be controlled in x and y axis for my application.