Style Windows.Forms.Button

Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
User avatar
jvierra
Posts: 13736
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: Style Windows.Forms.Button

Post by jvierra » Wed Aug 01, 2018 9:56 am

Just add the code to the button click events. Double click on the buttons in the designer and type in your code.

There are a number of YouTube video showing how to use the designer to add code to events.
https://www.youtube.com/watch?v=BAi81bOjYlQ&t=110s

User avatar
jvierra
Posts: 13736
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: Style Windows.Forms.Button

Post by jvierra » Wed Aug 01, 2018 10:00 am


hrlarsen
Posts: 28
Joined: Tue Jul 24, 2018 8:36 pm

Re: Style Windows.Forms.Button

Post by hrlarsen » Sat Aug 04, 2018 12:02 am

Thanks that help after I look at that.
Is there somewhere I can change the settings so I can see all Form code.
And not just part off it when I click labels, textboxes in forms and so on.
Right now it will unly show the minimum when click on elements, and hide the rest in the gui designer.
All the style is missing visual in script editor menu, when using the designer to change things like color, left, rigth, background etc.

User avatar
jvierra
Posts: 13736
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: Style Windows.Forms.Button

Post by jvierra » Sat Aug 04, 2018 12:11 am

What code are you not seeing? All event code is showing. You cannot and should not edit the initialization code. The IDE manages that ode as needed.

Open the manual for the product and read how the product works and how to use it. The manual will answer most of your questions.

If you want to look at the final code then export it to a file and open the file.

hrlarsen
Posts: 28
Joined: Tue Jul 24, 2018 8:36 pm

Re: Style Windows.Forms.Button

Post by hrlarsen » Mon Aug 06, 2018 2:10 am

okay thanks I will read about that.

Locked