Search found 14778 matches

by jvierra
Mon Apr 12, 2021 6:13 pm
Forum: PowerShell GUIs
Topic: GUI progress info for running tasks
Replies: 4
Views: 563

Re: GUI progress info for running tasks

To run asynchronous tasks consider the following article:
https://info.sapien.com/index.php/guis/ ... sive-forms
by jvierra
Mon Apr 12, 2021 6:09 pm
Forum: PowerShell GUIs
Topic: GUI progress info for running tasks
Replies: 4
Views: 563

Re: GUI progress info for running tasks

To add in any code in a form you have to place the code in an event like a button click.
by jvierra
Fri Apr 09, 2021 2:31 am
Forum: PowerShell
Topic: Force PStudio EXE to run from specified location only
Replies: 11
Views: 1857

Re: Force PStudio EXE to run from specified location only

Here is the fast way to get the PsDrive

Get-PsDrive "$([System.Windows.Forms.Application]::ExecutablePath[0])"

The following is teh easy way to get the root:

(Get-PsDrive "$([System.Windows.Forms.Application]::ExecutablePath[0])").Root
by jvierra
Fri Apr 09, 2021 2:23 am
Forum: PowerShell
Topic: Force PStudio EXE to run from specified location only
Replies: 11
Views: 1857

Re: Force PStudio EXE to run from specified location only

The current standard method for accessing an executable on a UNC path is to not use a mapped drive. Just specify the UNC path in the shortcut and deploy the shortcut to the “public Desktop” or to the users private desktop. This method is always best and prevents the issues you are having. In modern ...
by jvierra
Thu Apr 08, 2021 6:02 pm
Forum: PowerShell GUIs
Topic: recover click event of checkbox
Replies: 2
Views: 861

Re: recover click event of checkbox

You cannot update a non-glbal variable in a function or event directly. The variable besing accessed is out of scope. Why would you use two checkboxes to swap and unswap two strings. You can just use on box and check if it is checked. if($CheckBox1ADCreaDisplayName.Checked){ $textbox.Text = $GivenNa...
by jvierra
Thu Apr 08, 2021 11:13 am
Forum: PowerShell
Topic: Force PStudio EXE to run from specified location only
Replies: 11
Views: 1857

Re: Force PStudio EXE to run from specified location only

Actually your question is a bit ambiguous. Are you asking about the PowerShell Studio application or any application?

To easily find the executable of any application use the following.

[System.Windows.Forms.Application]::ExecutablePath
by jvierra
Thu Apr 08, 2021 11:00 am
Forum: PowerShell
Topic: Force PStudio EXE to run from specified location only
Replies: 11
Views: 1857

Re: Force PStudio EXE to run from specified location only

You have the PWD so just use that to get the drive.
by jvierra
Wed Apr 07, 2021 3:53 am
Forum: PowerShell GUIs
Topic: Apply filter to all columns on a Data Table?
Replies: 4
Views: 688

Re: Apply filter to all columns on a Data Table?

It's possible. Just write the filter code.
by jvierra
Wed Apr 07, 2021 2:00 am
Forum: PowerShell GUIs
Topic: Print results into a textbox in reverse order
Replies: 3
Views: 730

Re: Print results into a textbox in reverse order

Sorry - typo. SHould be

$textbox.Text = $newline + $textbox.Text

For ListBox just insert the line at index 0.

$listbox.Items.Insert(0,$line)