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.
Locked
Filters
Posts: 5
Joined: Mon Nov 05, 2018 7:44 am

little bit of value passing to form

Post by Filters » Mon Jan 21, 2019 7:28 am

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 :|

User avatar
jvierra
Posts: 13623
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: little bit of value passing to form

Post by jvierra » Mon Jan 21, 2019 10:00 am

Just add more parameters as needed.

Code: Select all

Param(
    $P1,
    $P2
    $P3,
     $P4,
     $P5
)
]/code]

Filters
Posts: 5
Joined: Mon Nov 05, 2018 7:44 am

Re: little bit of value passing to form

Post by Filters » Mon Jan 21, 2019 1:06 pm

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?

User avatar
jvierra
Posts: 13623
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: little bit of value passing to form

Post by jvierra » Mon Jan 21, 2019 1:53 pm

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

Locked