1
Support Questions / Resizing Controls at runtime
« on: May 04, 2015, 05:02:35 AM »
Hey Guys,
I'm trying to build an app with AdvancedHMI where i can move components and resize them during the execution of the app.
So far i found a way to do it for normal controls and advancedHMI controls, but when i try to apply it to a userControl, it works, but the controls inside it remain with their same respective sizes. And all i see is the borders of the usercontrol that are changing
I want to know if there is a way to make the components of a usercontrol change their size when the usercontrol's size change.
I tried this code and it works but it's very painful to find the good proportion and the good and it's really horrible.
Thanks in advance
I'm trying to build an app with AdvancedHMI where i can move components and resize them during the execution of the app.
So far i found a way to do it for normal controls and advancedHMI controls, but when i try to apply it to a userControl, it works, but the controls inside it remain with their same respective sizes. And all i see is the borders of the usercontrol that are changing
I want to know if there is a way to make the components of a usercontrol change their size when the usercontrol's size change.
I tried this code and it works but it's very painful to find the good proportion and the good and it's really horrible.
Code: [Select]
Private Sub UserControl1(sender As Object, e As EventArgs) Handles MyBase.SizeChanged
PictureBox1.Height = Me.Height / 3
PictureBox1.Width = Me.Width / 3
PictureBox2.Height = Me.Height / 3
PictureBox2.Width = Me.Width / 3
Button1.Height = Me.Height / 5
Button1.Width = Me.Width / 5
End Sub
Thanks in advance