Author Topic: Complete noob here  (Read 2404 times)

bagged2drag

  • Newbie
  • *
  • Posts: 1
    • View Profile
Complete noob here
« 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

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Complete noob here
« Reply #1 on: February 12, 2017, 09:41:56 AM »
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

Quote
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.

Quote
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

Larry Griffin

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Complete noob here
« Reply #2 on: April 07, 2017, 12:21:34 PM »
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

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Complete noob here
« Reply #3 on: April 07, 2017, 12:26:43 PM »
In C# you have to use a regular Windows button and use code:

Page2.Show
Me.Hide

Larry Griffin

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Complete noob here
« Reply #4 on: April 07, 2017, 04:44:07 PM »
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


Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Complete noob here
« Reply #5 on: April 07, 2017, 04:48:44 PM »
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

Larry Griffin

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Complete noob here
« Reply #6 on: April 07, 2017, 05:25:14 PM »
Terrific!  ...Liking this more and more...

LarGriff