Filter specefic output from textbox to richtextbox

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 4 years and 6 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
cedkan
Posts: 7
Last visit: Tue Dec 26, 2023 2:36 am

Filter specefic output from textbox to richtextbox

Post by cedkan »

Product, version and build:
32 or 64 bit version of product:Product: PowerShell Studio 2019 (64 Bit)
Build: v5.6.167
OS: Windows 10 Pro (64 Bit)
Build: v10.0.17763.0
Operating system:
64 bit OS:


Hi i having trouble with getting this to work.

on my form i have one textbox one button and one richtextbox. In the textbox i want to type a kb number (path) and then with the button just return that specefic path if its installed. the problem iam having is that nothing works. I should say that on the same form i also have one more button for get all installed patches. can someone take a look on this ?

thanks for your help!
Attachments
gwu.psf
(18.18 KiB) Downloaded 84 times
User avatar
brittneyr
Site Admin
Posts: 1654
Last visit: Wed Mar 27, 2024 1:54 pm
Answers: 39
Been upvoted: 30 times

Re: Filter specefic output from textbox to richtextbox

Post by brittneyr »

[TOPIC MOVED TO CORRECT FORM BY MODERATOR]
Brittney
SAPIEN Technologies, Inc.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Filter specefic output from textbox to richtextbox

Post by jvierra »

Just add the hotfix id to the command:

Get-HotFix -Id KB4511522
cedkan
Posts: 7
Last visit: Tue Dec 26, 2023 2:36 am

Re: Filter specefic output from textbox to richtextbox

Post by cedkan »

Hi
thanks for the reply this goes in the event for the button or the textbox? sorry for the dumb question

thansk again
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Filter specefic output from textbox to richtextbox

Post by jvierra »

I cannot answer that because the code and your question are too vague.

I suggest that you start by reading the following articles to gin a basic understanding of designing and coding forms.

https://info.sapien.com/index.php/guis/ ... nistrators

The info center has many articles on how to create forms and an extensive list of articles on most controls with examples.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Filter specefic output from textbox to richtextbox

Post by jvierra »

Here is my best guess. It will give you some hints as to how forms and PowerShell work.
Attachments
Get-HotfixByID.psf
(24.21 KiB) Downloaded 98 times
cedkan
Posts: 7
Last visit: Tue Dec 26, 2023 2:36 am

Re: Filter specefic output from textbox to richtextbox

Post by cedkan »

Hi jvierra

first of thanks for your sugesstion it worked great. Afterwards when i think of it i tried it out but forgot the textmethod so nothing could be returned from te textbox. Anyway thank you

you can close the thread now
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Filter specefic output from textbox to richtextbox

Post by jvierra »

Here is an example of how easy this is with the right controls and code.

The hot fixes are listed in a usable form and can be sorted by clicking the column headers. The list can be filtered by typing in any part of a KB ID and filters as you type.

Try it.
Attachments
Get-HotfixByID.psf
(28.29 KiB) Downloaded 93 times
This topic is 4 years and 6 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