Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - yubish

Pages: [1]
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.


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

2
Thank you Archie. I wrote the code in a similar way by including the initialization in the property :
 
   
Code: [Select]
Public CommComponent As AdvancedHMIDrivers.IComComponent
    Public Property CommComponent() As AdvancedHMIDrivers.IComComponent
        Get
            Return m_CommComponent
        End Get
        Set(value As AdvancedHMIDrivers.IComComponent)
            CommComponent = value
            BasicLabel3.CommComponent = value
        End Set

    End Property

It works well but i don't know if it's right.

3
Hi Archie !
Thank you so much for your collaboration and for the update, the bugs are fixed (y).
I had another idea, instead of including the ethernet driver in the usecontrol, i thought if it could be possible to insert the driver only in the mainform and have a property in the usercontrol that links the driver with the advancedHMI controls of our usercontrol.
This could help us avoid using the driver in each usercontrol in the mainform. As a newbie in VB, i don't know if it's possible to do this in it.
Thank's in advance.

4
Hi again Archie ! We're always waiting for the next release, i hope it's going good.
Thank you a lot for your efforts, it's a great work and good luck.

5
Thank you a lot Archie !

6
After it didn't work in The AdvancedHMI project, I moved it to the AdvancedHMI Controls project.

The problem is that when we put AdvancedHMI controls in a UserControl, we need a driver component included in the UserControl to set it in the properties of each AdvancedHMI control for the communication with the PLC, and the problem 'incomplete solution' appears only with the EthernetIP driver

8
Thank you Archie.
But, what can i do in this situation to resolve this problem ?
You will find attached the picture of the message error

9
Thanks, It works well with the AdvancedHMI controls but i still have a problem, especially, when i add the component EthernetIPforCLXcom driver, i have a message error that indicates "incomplete solution".
In my usercontrol, i need 2 Datasubscribers and the EthernetIPforCLXcom component for the datasbscribers.  All the other drivers work when i add them in my usercontrol, the message error appears only when i add the EthernetIPforCLXcom driver.

10
I mean by component a control. What i want actually is to create my own component (control) using AdvancedHMI controls and drivers,
 to mix a number of components (controls and drivers) in one component (one control) and the possibility for the result component (control) to inherit properties from his components (AdvancedHMI controls and drivers).

11
Hi, i'm a newbie and i'm trying to become more familiar with VB.NET
My question is : It is possible to create a component that includes AdvancedHMI controls and drivers and use it after in the project ?
For example, in my situation, i want to create a component that includes 2 Datasubscribers, the Ethernet/IP driver component and a digital panel meter.

Thank you in advance

Pages: [1]