Search found 63 matches
- Mon Feb 13, 2017 7:17 pm
- Forum: PowerShell GUIs
- Topic: Show_GUIForm from ps1 script without waiting for the GUIForm to close...
- Replies: 1
- Views: 1949
Re: Show_GUIForm from ps1 script without waiting for the GUIForm to close...
You could launch your window using a runspace. [int]$Counter = 1 if($counter -lt 5000){ $counter++ Start-Sleep -Seconds 3 } $RunSpace = [RunSpaceFactory]::CreateRunSpace() #Create new runspace. $RunSpace.ApartmentState = 'STA' $RunSpace.ThreadOptions = 'UseNewThread' $RunSpace.Open() $Instance = [Po...
- Wed Feb 08, 2017 9:32 pm
- Forum: PowerShell GUIs
- Topic: Window not closing
- Replies: 15
- Views: 6298
Re: Window not closing
While the resident bull was snarling and kicking up dust, I decided to make an example project of what I think the original question was asking. Brian I hope this example is something along the lines of what you were looking for. I will be washing my hands of this discussion now. More exactly - my ...
- Wed Feb 08, 2017 8:23 pm
- Forum: PowerShell GUIs
- Topic: Window not closing
- Replies: 15
- Views: 6298
Re: Window not closing
None necessary, this forum has been a great resource for me. I just like to return the favor if at all possible.DevinL wrote:Thanks for the example, rmckay!
I'll be keeping this one for future use.
- Wed Feb 08, 2017 7:59 pm
- Forum: PowerShell GUIs
- Topic: Window not closing
- Replies: 15
- Views: 6298
Re: Window not closing
While the resident bull was snarling and kicking up dust, I decided to make an example project of what I think the original question was asking. Brian I hope this example is something along the lines of what you were looking for. I will be washing my hands of this discussion now.
- Wed Feb 08, 2017 6:44 pm
- Forum: PowerShell GUIs
- Topic: Window not closing
- Replies: 15
- Views: 6298
Re: Window not closing
This has nothing to do with Sapien. It is how Windows works. Sapien, PowerShell Studio, and PowerShell can only use what Microsoft has designed. Since the very beginning of Windows (1985) this was part of the design. There is no direct way around this. If you don't like it speak to the Microsoft en...
- Wed Feb 08, 2017 6:03 pm
- Forum: PowerShell GUIs
- Topic: Window not closing
- Replies: 15
- Views: 6298
Re: Window not closing
[System.Windows.Forms.Form]::ActiveForm.Visible = $false In the button click event that calls your new form, place this after the call to the new form is made. Should call the new form and then hide itself. Had to update my original post because I keep forgetting these are still modal forms... In a...
- Wed Feb 08, 2017 5:06 pm
- Forum: PowerShell GUIs
- Topic: Window not closing
- Replies: 15
- Views: 6298
Re: Window not closing
Code: Select all
[System.Windows.Forms.Form]::ActiveForm.Visible = $false
Should call the new form and then hide itself. Had to update my original post because I keep forgetting these are still modal forms...
- Tue Jan 24, 2017 9:31 pm
- Forum: PowerShell Studio
- Topic: Possible Bug in PowerShell Studio 2017
- Replies: 7
- Views: 3854
Re: Possible Bug in PowerShell Studio 2017
Just wanted to post back here on that "workaround" that I thought i had found. The example I posted will work great if a portion of your program needs to call upon a .dll file. But it is not a solution for a exe.config file as after further testing the Powershell Studio .exe still wants th...
- Wed Jan 18, 2017 5:26 pm
- Forum: PowerShell Studio
- Topic: Possible Bug in PowerShell Studio 2017
- Replies: 7
- Views: 3854
Re: Possible Bug in PowerShell Studio 2017
I just slung in a workaround to mask the problem. $ConFigPth = "$env:temp\DataEntry.exe.config" if (!(Test-Path $ConFigPth)) { $ConFig = [System.Convert]::FromBase64String($ConfigBase64) Set-Content -Path $env:temp\DataEntry.exe.config -Value $ConFig -Encoding Byte } Add-Type -Path $env:te...
- Wed Jan 18, 2017 1:03 pm
- Forum: PowerShell Studio
- Topic: Possible Bug in PowerShell Studio 2017
- Replies: 7
- Views: 3854
Re: Possible Bug in PowerShell Studio 2017
The problem is that I have invested many hours building a fairly complex program as a portable standalone executable requiring no external files for operation and now I will be required to include what I've tried so hard to prevent. Config files seem like a tacked on and very sloppy approach to me.