little bit of value passing to form

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 5 years and 2 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
Filters
Posts: 5
Last visit: Fri Feb 14, 2020 12:43 am

little bit of value passing to form

Post by Filters »

hi i'm having problem with multiple value passing to new form
with one value there is no problem but how to pass 2-3-5 different values to new form

Code: Select all

(Show-Domain_Users_psf $select_domain.Text)

Code: Select all

param ($domain_selected)
but how to pass multiple values to new form :|
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: little bit of value passing to form

Post by jvierra »

Just add more parameters as needed.

Code: Select all

Param(
    $P1,
    $P2
    $P3,
     $P4,
     $P5
)
]/code]
Filters
Posts: 5
Last visit: Fri Feb 14, 2020 12:43 am

Re: little bit of value passing to form

Post by Filters »

maybe this will sound stupid question but i'm new to powershell
but from otherside?

Code: Select all

Call-AddEmployeeForm_psf $p1.text,
					  $p2.text,
					  $p3.text
something like that?
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: little bit of value passing to form

Post by jvierra »

Start here:
help about_parameters

Also:
help about_functions

To learn PowerShell without learning bad things from guessing or from bad internet advise and examples start here:

Microsoft Virtual Academy - Getting Started with Microsoft PowerShell
This topic is 5 years and 2 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