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.
Locked
cedkan
Posts: 7
Joined: Sun Aug 12, 2018 6:33 am

Filter specefic output from textbox to richtextbox

Post by cedkan » Sun Sep 01, 2019 8:45 am

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 10 times

User avatar
brittneyr
Site Admin
Posts: 224
Joined: Thu Jun 01, 2017 7:20 am

Re: Filter specefic output from textbox to richtextbox

Post by brittneyr » Sun Sep 01, 2019 9:09 am

[TOPIC MOVED TO CORRECT FORM BY MODERATOR]
Brittney Ryn
SAPIEN Technologies, Inc.

jvierra
Posts: 13901
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: Filter specefic output from textbox to richtextbox

Post by jvierra » Sun Sep 01, 2019 11:16 am

Just add the hotfix id to the command:

Get-HotFix -Id KB4511522

cedkan
Posts: 7
Joined: Sun Aug 12, 2018 6:33 am

Re: Filter specefic output from textbox to richtextbox

Post by cedkan » Sun Sep 01, 2019 12:24 pm

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: 13901
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: Filter specefic output from textbox to richtextbox

Post by jvierra » Sun Sep 01, 2019 12:38 pm

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: 13901
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: Filter specefic output from textbox to richtextbox

Post by jvierra » Sun Sep 01, 2019 3:35 pm

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 12 times

cedkan
Posts: 7
Joined: Sun Aug 12, 2018 6:33 am

Re: Filter specefic output from textbox to richtextbox

Post by cedkan » Mon Sep 02, 2019 8:18 am

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: 13901
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: Filter specefic output from textbox to richtextbox

Post by jvierra » Mon Sep 02, 2019 10:09 am

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 12 times

Locked