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.
This topic is 5 years and 7 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Style Windows.Forms.Button

Post by jvierra »

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
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Style Windows.Forms.Button

Post by jvierra »

hrlarsen
Posts: 31
Last visit: Sun Dec 18, 2022 1:47 pm

Re: Style Windows.Forms.Button

Post by hrlarsen »

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.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Style Windows.Forms.Button

Post by jvierra »

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: 31
Last visit: Sun Dec 18, 2022 1:47 pm

Re: Style Windows.Forms.Button

Post by hrlarsen »

okay thanks I will read about that.
This topic is 5 years and 7 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked