Search found 13586 matches

by jvierra
Mon Jun 24, 2019 7:55 am
Forum: Windows PowerShell
Topic: PowerShell Packaged to exe; Trouble with Write-Output
Replies: 4
Views: 145

Re: PowerShell Packaged to exe; Trouble with Write-Output

Put the following in a PS1 file and build with V5 (command line) and you will see the output.

Code: Select all

Write-Host "Write-Host"
Write-Output "Write-Output"
pause
by jvierra
Mon Jun 24, 2019 7:52 am
Forum: Windows PowerShell
Topic: PowerShell Packaged to exe; Trouble with Write-Output
Replies: 4
Views: 145

Re: PowerShell Packaged to exe; Trouble with Write-Output

Is this a form? Is it a simple script? What commands are you trying to output?
by jvierra
Sun Jun 23, 2019 10:41 am
Forum: PowerShell GUIs
Topic: Open a file with an Powershell Studio generated exe and catch filename in variable?
Replies: 1
Views: 52

Re: Open a file with an Powershell Studio generated exe and catch filename in variable?

See:

cmd /c assoc /?
cmd /c ftype /?


Once you associate the extension with your EXE then will have the filename.

The only other legal way to do this is to write a shell extension that handles all unrecognized extensions and have it do what you ask.
by jvierra
Fri Jun 21, 2019 2:28 pm
Forum: Windows PowerShell
Topic: PowerShell Packaged to exe; Trouble with Write-Output
Replies: 4
Views: 145

Re: PowerShell Packaged to exe; Trouble with Write-Output

You have to use the correct host to get output. "V5 Host (command line)".
by jvierra
Fri Jun 21, 2019 10:35 am
Forum: Windows PowerShell
Topic: TreeView Node Selection
Replies: 10
Views: 271

Re: TreeView Node Selection

You have to add the event code to the treeview or it will not be called.
by jvierra
Fri Jun 21, 2019 6:39 am
Forum: Windows PowerShell
Topic: TreeView Node Selection
Replies: 10
Views: 271

Re: TreeView Node Selection

Why don't you use the designer? It makes forms much easier to work with.
You can also export the PSF to a PS1 to see how the code works.
by jvierra
Fri Jun 21, 2019 5:47 am
Forum: Windows PowerShell
Topic: TreeView Node Selection
Replies: 10
Views: 271

Re: TreeView Node Selection

Why would you add that line. That is added automatically when you define an event in the designer. I would suggest reading the manual for PSS. The first few pages will tell you how to create events and how to edit the generated code. It will also tell you how to use the toolbox and the control prope...
by jvierra
Thu Jun 20, 2019 12:49 pm
Forum: PowerShell GUIs
Topic: Display Combobox entries
Replies: 5
Views: 122

Re: Display Combobox entries

You can also just do this after loading the CB:

$combobox1.Items.AddRange(@('aaa','bbb','ccc','ddd'))
$combobox1.DroppedDown = $true
by jvierra
Thu Jun 20, 2019 12:44 pm
Forum: PowerShell GUIs
Topic: Display Combobox entries
Replies: 5
Views: 122

Re: Display Combobox entries

Just set the ComboBox "DropDownStyle" property to "Simple" and it will display all of the entries like a ListBox.
by jvierra
Thu Jun 20, 2019 11:56 am
Forum: Windows PowerShell
Topic: TreeView Node Selection
Replies: 10
Views: 271

Re: TreeView Node Selection

Just a little background. Of all controls in WinForms "Item Selected" is managed by the OS. It does this by sending messages to the control on mouse events and on keyboard events. The highlighting is managed by the system but, with many con trolls, can be customized. This is true for ListView and Da...