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 6 years and 1 month 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.
But when I save and run all I see on the form is "Label" it doesn't display the information I am trying to pipe to it.
Here is the entirety of my code so far. Please note that the LinkLabel works as intended OK. Just not sure how / where to insert this other code so the tab will display it.
When posting large amounts of code please post the code as a file attachment. Copying the code from tis code box (which beaks the code's text) is difficult and we don't have your forms settings.
Just attach the PSF file.
Also note that all changes to controls must be done inside of an event and the variables must by "in scope".
Sorry about that, noted for the future as I can't edit the original and I didn't want to start a new thread.
OK PSF attached as well as tab1 and tab2 which is the code I want to insert. This is really easy to do when just creating a multi form project, I can not figure out how to create an event for a tabbed project.
I cannot understand what you mean by inserting code. The code snippets cannot just be inserted. They have to go in an event somewhere. What event causes this code to be executed? You refer to two buttons named "$buttonPrev_Click" Those buttons do not exist in your form. Your code refers to "$label1" which does not exist.
Right that is what I am trying to get help with. How do I create an event for a tab?
How do I create an event for a tab section and input code into it? In this case, I want it to gather information about the computer from WMI and display it in labels.
the buttons code is there because when you create the form by default it puts buttons which I removed from the graphical.
I didn't say double click. Just click in the middle of the tab page you want to add an event to and use the properties pages (events tab) to add any event that you want.
What I can tell is that you have not learned how to use the designer. Open the manual from the help bar (left side) and read the parts o n the designer bits and how to use it.
This topic is 6 years and 1 month 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.