Powershell GUI for LMUTIL

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 8 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.
Locked
User avatar
ron.allison08
Posts: 4
Last visit: Fri Sep 09, 2022 11:02 am

Powershell GUI for LMUTIL

Post by ron.allison08 »

Hi,

I'm a beginner with Powershell, but in the process of creating a GUI for returning license statistics on our license servers.

Here's the gist:

The different network-licensed software packages are listed in a combobox.
When I select from the combobox, it outputs the text to a richtextbox.
As of right now, I'm using a button to call the Clear() function to remove the text from richtextbox.
If I don't use the Clear button, and select another software package from the list, it appends the output text to the richtextbox.

What I would like:
When selecting from the combobox, it clears the output in the richtextbox.

Thanks for any help.
User avatar
monoeagle
Posts: 108
Last visit: Fri Jan 26, 2024 10:44 am

Re: Powershell GUI for LMUTIL

Post by monoeagle »

Hi,
$ComboBox1_SelectedIndexChanged=
{
$richtextbox1.Clear()

# do something else
}
greetz
User avatar
ron.allison08
Posts: 4
Last visit: Fri Sep 09, 2022 11:02 am

Re: Powershell GUI for LMUTIL

Post by ron.allison08 »

Hi,

Thanks for the input, unfortunately this did not work. It continues to append the output to the richtextbox.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Powershell GUI for LMUTIL

Post by jvierra »

$richtextbox.Text='New text'

Of course without your script we cannot really tell how you are doing this. You have to post the code that outputs to the textbox.
This topic is 8 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.
Locked