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 3 years and 2 weeks 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.
$form1_Load={
}
$rdoTEST1_CheckedChanged = {
if ($this.Checked -eq $true)
{
#Use the Radio Button's Text to set the label
$lblTEST.Text = "This is a test"
}
}
I have double checked and cross checked for misspelled variables, but can't find the error.
Thanks jvierra
I made it work, but only by exporting to *.ps1, adding the lines $radiobutton1.add_CheckedChanged($radiobutton_CheckedChanged) and $radiobutton2.add_CheckedChanged($radiobutton_CheckedChanged) to each radiobutton manually.
Is this the way to make it work or should it be done all from within Powershell Studio?
You will need to spend some time learning how to use PSS before you can understand how these thigs work. The example I posted shows exactly how to do this but the steps will have to be learned from the manual or from a video.
All code can be done from PSS. If you try to copy things from the Internet without first learning both PowerShell and PSS then you will end up where you are now which will end up causing you more confusion in the long run.
This topic is 3 years and 2 weeks 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.