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 11 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.
[System.Windows.Forms.MessageBox]::Show("$upn heeft nu rechten op remote toegang middels RSA (softtoken).","Remote toegang RSA",'Ok','Information');
}
Set-Variable-Name IctDienstRemoteToegang -Value'RemoteRSA'-Scope Global
$buttonRemoteToegang.ImageIndex =0
$formICTDienstRemoteToega.Close()
}
With the first sollution I got an empty button (so no index, 0 or 1, was placed).
With the second one I get:
ERROR: The property 'ImageIndex' cannot be found on this object. Verify that the property exists and can be set.
You define your parameters in one order but have passed them in a different order. If we use named parameters then we should name all parameters and pass by name. Mixing these will only lead to failure.
If you pass by ref use the objects "Value". If you pass directly then don't use a ref. You are mixing and matching many incompatible methods.
This topic is 5 years and 11 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.