Quantcast
Channel: PowerShell
Viewing all articles
Browse latest Browse all 15370

Powershell - problems combining parameters with windows form build

$
0
0

I don't know if it's normal but if i include the following lines

Powershell
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")

in a script and at the same time define parameters to be passed to that function like

Powershell
[CmdletBinding()]Param([Parameter(Mandatory=$True,Position=1)][string]$fname,[Parameter(Mandatory=$True,Position=2)][string]$sname)

the script seems to tilt out. Does anyone have a reason for it? Is this a limitation or am i most likely doing something wrong?

The reason is that in one part of a script i select a client from a drop down box or tree view and then get the attributes (from what i selected) to be passed on to build up a form where a user has to fill out a few more fields before the actual final...


Viewing all articles
Browse latest Browse all 15370

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>