Search found 11720 matches

by jvierra
Thu Jan 18, 2018 5:13 pm
Forum: PowerShell GUIs
Topic: Newbie form questions
Replies: 10
Views: 100

Re: Newbie form questions

Add the "param statement to the form at the top. After you build the exe this will accept your parameters. To understand how to use PowerShell and the "Param" statement see: https://www.sapien.com/forums/viewtopic.php?f=21&t=6451 For specifics on "Param" see: https://www.sapien.com/forums/viewtopic....
by jvierra
Thu Jan 18, 2018 3:57 pm
Forum: PowerShell GUIs
Topic: Newbie form questions
Replies: 10
Views: 100

Re: Newbie form questions

Command line parameters in PowerShell are retrieved via a "Param" statement or via the built-in $args variable.

http://www.itprotoday.com/management-mo ... ell-params
by jvierra
Thu Jan 18, 2018 3:11 pm
Forum: PowerShell GUIs
Topic: Newbie form questions
Replies: 10
Views: 100

Re: Newbie form questions

Cody has shown a brute force method but there are other ways to do this. Cody's method removes everything. The individual buttons can be removed and the form frame type can also be changed to accomplish this. You can also just create the original form by creating a "Dialog Form" from the templates l...
by jvierra
Thu Jan 18, 2018 2:21 pm
Forum: PowerShell GUIs
Topic: Newbie form questions
Replies: 10
Views: 100

Re: Newbie form questions

You cannot access a form from the command line while the form is displayed. You could not have read all of the information in such a short time. One of the suggestions was to go through each control and become familiar with the control. A form is a control. Familiarize yourself with the "Properties"...
by jvierra
Thu Jan 18, 2018 12:57 pm
Forum: PowerShell GUIs
Topic: Newbie form questions
Replies: 10
Views: 100

Re: Newbie form questions

Hi and welcome to Windows Forms. Wow! A bunch of questions. I am sure you will have a hundred more. Before trying to ask for every step in designing a form you need to review the basics of forms creation. Here is a good article that will help you get started. If you look at the left menu there are a...
by jvierra
Thu Jan 18, 2018 11:26 am
Forum: PowerShell GUIs
Topic: Checkedlistbox Highlighting
Replies: 3
Views: 73

Re: Checkedlistbox Highlighting

Sorry. I was thinking of WPF.

You can't turn off the hilite.
by jvierra
Thu Jan 18, 2018 11:11 am
Forum: PowerShell GUIs
Topic: Checkedlistbox Highlighting
Replies: 3
Views: 73

Re: Checkedlistbox Highlighting

Change hilite to control background color.
by jvierra
Thu Jan 18, 2018 10:09 am
Forum: PowerShell GUIs
Topic: In a Treeview, how to select only one checkbox?
Replies: 3
Views: 110

Re: In a Treeview, how to select only one checkbox?

The code you attached and the CSV do not match.
You are trying to do to many disconnected things without understanding the treeview.

Review the attached to see how to easily work with a treeview and PowerShell.

You can use the function to check any node and all child nodes.
by jvierra
Thu Jan 18, 2018 7:52 am
Forum: PowerShell GUIs
Topic: In a Treeview, how to select only one checkbox?
Replies: 3
Views: 110

Re: In a Treeview, how to select only one checkbox?

You will have to enumerate the child nodes and set the checkbox state. TreeView checkboxes are not identical to standard checkbox controls. $treeview1_AfterCheck=[System.Windows.Forms.TreeViewEventHandler]{ Write-Host $_.Node.Text # check all child nodes $_.Node.Nodes | %{ $_.Checked = $true } }
by jvierra
Wed Jan 17, 2018 2:37 pm
Forum: Windows PowerShell
Topic: Combing 2 objects
Replies: 9
Views: 188

Re: Combing 2 objects

That would not work. foreach ($objA in $objAs) { if($objB = $objBs | where{$_.ComputerName -eq $objA.ComputerName}){ [pscustomobject]@{ ComputerName = $objA.ComputerName Soruce = $objA.Soruce Port = $objA.Port Path1 = $objB.Path1 Path2 = $objA.Path2 Path3 = $objA.Path3 } } else { Write-Host ('Object...