Search found 8 matches
- Thu Aug 25, 2022 12:04 pm
- Forum: Former and Future Customers - Questions
- Topic: PowerShell 7 WPF and PowerShell Studio 2022 (64 Bit) 5.8.209
- Replies: 2
- Views: 3291
PowerShell 7 WPF and PowerShell Studio 2022 (64 Bit) 5.8.209
Product, version and build: PowerShell Studio 2022 (64 Bit) v5.8.209 Operating system: Windows 11 PowerShell version(s): 5.1.22621.436 and 7.0.11 / 7.4 simple code with WPF form with Powershell Studio If I run this code with Powershell 5 - it's ok Screenshot 2022-08-25 215402.png If I run this code ...
- Fri May 20, 2022 11:57 am
- Forum: PowerShell GUIs
- Topic: Need help with WPF and form stuck
- Replies: 15
- Views: 2603
Re: Need help with WPF and form stuck
I just want to add information to the field while the script is running. in Windows.Forms this can be done via doevents(). The example in the first post shows exactly this problem. Again, the examples show you how to do this. The code you posted also adds to the control with no issues, so I have no...
- Fri May 20, 2022 7:30 am
- Forum: PowerShell GUIs
- Topic: Need help with WPF and form stuck
- Replies: 15
- Views: 2603
Re: Need help with WPF and form stuck
Here is another example that I wrote about seven years ago for someone who had a well asked question, so it was easy to provide a simple example. The solution shows some things about how you can add events to a WPF form at any time and have them execute in the context of the form rather than in the...
- Wed May 18, 2022 7:20 am
- Forum: PowerShell GUIs
- Topic: Need help with WPF and form stuck
- Replies: 15
- Views: 2603
- Wed May 18, 2022 4:17 am
- Forum: PowerShell GUIs
- Topic: Need help with WPF and form stuck
- Replies: 15
- Views: 2603
Re: Need help with WPF and form stuck
Even with runspaces you cannot create a multi-threaded runspace. A runspace is a single thread and so is a job. Your original question is very vague. It sounds like you are in a loop and the progress bar is using a timer. A timer event can allow a blocked event to act like it is not blocked wheneve...
- Wed May 18, 2022 12:18 am
- Forum: PowerShell GUIs
- Topic: Need help with WPF and form stuck
- Replies: 15
- Views: 2603
Re: Need help with WPF and form stuck
When I build WPF forms I create them in Visual Studio in C# then put them in a DLL and call the form from script. This allows us to use the "Run" method which creates the corrected threaded environment for WPF forms. It also isolates the form from PowerShell bu you lose the ability to int...
- Tue May 17, 2022 10:13 am
- Forum: PowerShell GUIs
- Topic: Need help with WPF and form stuck
- Replies: 15
- Views: 2603
Re: Need help with WPF and form stuck
WPF main forms will not work correctly in PowerShell. WPF forms require a multi-threaded environment. PowerShell is single threaded only. PowerShell studio allows us to create WPF controls. Some controls will work but not all WPF designed controls will work easily with PowerShell even with the Sapi...
- Tue May 17, 2022 9:01 am
- Forum: PowerShell GUIs
- Topic: Need help with WPF and form stuck
- Replies: 15
- Views: 2603
Need help with WPF and form stuck
Hi all. My question is: how does it work? Attached code. Run Globals.ps1 via Sapien Powershell Studio. change true/false in the first line When the Write-Progress is displayed, the form does not stuck, but without it - stuck. Why? I understand Write-Progress is just "on/off" its form and d...