AdvancedHMI Software
General Category => Open Discussion => Topic started by: bagged2drag on February 11, 2017, 09:57:21 PM
-
I am excited to have found this project and this group. I am 100% new to VB and anything related. As far as the advanced HMI, I have a couple quick and probably easy questions.
1. Whats the easiest method to create a "screen change" menu and how do I go about linking those screens?
2. I was playing around with the pushbuttons. Is there any way to use my own image instead of the standard boxes?
3. After creating my project, how do I make it into an executable to deploy on a pc?
Any help or responses would be appreciated.
Kris
-
1. Whats the easiest method to create a "screen change" menu and how do I go about linking those screens?
Using the FormChangeButton and the FormToOpen property
2. I was playing around with the pushbuttons. Is there any way to use my own image instead of the standard boxes?
The GraphicIndicator functions as a button and allows you to specify images.
3. After creating my project, how do I make it into an executable to deploy on a pc?
After you run the project in Visual Studio, it creates the exe for you. See this thread for the recommended deployment practice:
http://advancedhmi.com/forum/index.php?topic=14.msg37#msg37
-
1. Whats the easiest method to create a "screen change" menu and how do I go about linking those screens?
Using the FormChangeButton and the FormToOpen property
That's fine for Visual Basic... how would you do it in C#? Those properties don't exist?
LarGriff
-
In C# you have to use a regular Windows button and use code:
Page2.Show
Me.Hide
-
Thanks for the quick response, Archie!
After a little experimentation, what I ended up doing was to keep everything on one form, but use Containers Panels to contain the controls I want on each "screen". Then I use a row of buttons to select the Visibility properties.
private void panel1Button_Click()
{
panel1.Visible = true;
panel2.Visible = false;
panel3.Visible = false;
}
private void panel2Button_Click()
{
panel1.Visible = false;
panel2.Visible = true;
panel3.Visible = false;
}
private void panel3Button_Click()
{
panel1.Visible = false;
panel2.Visible = false;
panel3.Visible = true;
}
Not sure what I'll do if I need to turn off PLC data on the invisible panels...
LarGriff
-
With that method, you will need a separate driver instance for the controls on each panel, then set the DisableSubscriptions to True when the panel is hidden
-
Terrific! ...Liking this more and more...
LarGriff