Author Topic: Transparent FormChangeButton  (Read 992 times)

Steve Etter

  • Newbie
  • *
  • Posts: 26
    • View Profile
Transparent FormChangeButton
« on: October 31, 2017, 08:15:09 AM »
I'm trying create formchange buttons that are active but transparent.  Basically I have a page with a cell layout and the operator will touch the one of several machines and the HMI will then switch to display a machine-specific page.  I can't seem to find a way to make the buttons transparent though.

Steve Etter

  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: Transparent FormChangeButton
« Reply #1 on: October 31, 2017, 11:28:31 AM »
Well, after some scouring of the web, it appears I have my solution.  The problem was that I was trying to place the FormChangeButton on top of a PictureBox.

This is not allowed.  In fact, as I understand it, no two controls can be placed on top of each other with the lower of the two showing through the upper.  The only way for a control to be transparent and display what is below it is for the control to be directly on the page.

So, my solution is to place my cell image on the page itself (Form.BackgroundImage=>image.jpg) and then adjust my FormChangeButton to be transparent

FormChangeButton.Appearance.Backcolor => Transparent
FormChangeButton.FlatAppearance.Bordersize => 0
FormChangeButton.FlatAppearance.MouseDownBackColor => Transparent
FormChangeButton.FlatAppearance.MouseOverBackColor => Transparent
FormChangeButton.FlatAppearance.Bordersize => 0
FormChangeButton.FlatStyle => Flat
FormChangeButton.Font.Text => (Blank)

Phrog30

  • Guest
Re: Transparent FormChangeButton
« Reply #2 on: October 31, 2017, 11:44:53 AM »
I have create a transparent panel that works somewhat well.  You can then add code to it for whatever you want to do.  We use it as a nav/goto button that is transparent and placed on top of other controls.  These controls are visible, but you can no longer click on them.  I can post the control if you are interested.

James