Search found 23 matches

by raphaelgj
Fri Nov 16, 2018 11:46 am
Forum: PowerShell GUIs
Topic: Export Datagridview to CSV
Replies: 11
Views: 6755

Re: Export Datagridview to CSV

You have to load the grid from a DataTable in order to have a "data bound" row. In my case since the grid is created from a lot of different variables using : $datagridviewInfo.Rows.Add(" ", " ") Is there a way to create a new DataTable FROM the already populated rows??
by raphaelgj
Fri Nov 16, 2018 11:28 am
Forum: PowerShell GUIs
Topic: Export Datagridview to CSV
Replies: 11
Views: 6755

Export Datagridview to CSV

In my application, I have a datagridview that looks like this (2 columns displaying info with no row header, no column header) : PROPERTY | VALUE PROPERTY | VALUE PROPERTY | VALUE PROPERTY | VALUE PROPERTY | VALUE Which is created by multiple : $datagridviewInfo.Rows.Add("PropertyX", $Valu...
by raphaelgj
Tue Nov 13, 2018 4:51 am
Forum: PowerShell GUIs
Topic: Output being cut in compiled EXE but not is PS Studio
Replies: 8
Views: 2417

Re: Output being cut in compiled EXE but not is PS Studio

There turns out to be an easier way to do this. Just set the width in Out-String. It defaults to current console width which is 80 if it has not been explicitly set to a different value. $textboxContenu.text = Get-ChildItem -Path $($folderbrowsermoderndialog1.SelectedPath) -Recurse | select Name,Di...
by raphaelgj
Mon Nov 12, 2018 5:41 pm
Forum: PowerShell GUIs
Topic: Output being cut in compiled EXE but not is PS Studio
Replies: 8
Views: 2417

Re: Output being cut in compiled EXE but not is PS Studio

How should it be approached code wise then ? Do I need to specify console width or change the command somehow? New to this issue of width being different in studio than compiled.
by raphaelgj
Mon Nov 12, 2018 12:33 pm
Forum: PowerShell GUIs
Topic: Output being cut in compiled EXE but not is PS Studio
Replies: 8
Views: 2417

Output being cut in compiled EXE but not is PS Studio

Wow this is weird. I have this simple command showing name and directory output in a textbox : $textboxContenu.text = Get-ChildItem -Path $($folderbrowsermoderndialog1.SelectedPath) -Recurse | select Name,Directory | Format-Table -AutoSize | Out-String If i RUN (F5) the form in powershell studio, it...
by raphaelgj
Sat Sep 22, 2018 12:18 pm
Forum: PowerShell GUIs
Topic: Form stuck in minimized state while loop running?
Replies: 9
Views: 4109

Re: Form stuck in minimized state while loop running?

Thank you for the clear information, much appreciated. Still very new to the form concepts... The examples on the article mentioned are very complex :shock: What I ended up doing, keeping it simple, is start a job, start a timer, and in the timer tick, update status bar after checking for a certain ...
by raphaelgj
Fri Sep 21, 2018 11:26 am
Forum: PowerShell GUIs
Topic: Form stuck in minimized state while loop running?
Replies: 9
Views: 4109

Re: Form stuck in minimized state while loop running?

Have a look at this demo, it shows exactly what's going on :
https://imgur.com/a/MOQlIZy

(click away and restoring is fine, but minimize it and it's gone for good. While the loop is NOT running, minimize works correctly)
by raphaelgj
Fri Sep 21, 2018 11:19 am
Forum: PowerShell GUIs
Topic: Form stuck in minimized state while loop running?
Replies: 9
Views: 4109

Re: Form stuck in minimized state while loop running?

Something even weirder I noticed, if I click away to some other window, when i click on the icon in the taskbar, it brings back the form properly. All while the loop is running. The problem is only when you minimize the window. Clicking the icon doesn't trigger the restore for some reason I don't un...
by raphaelgj
Fri Sep 21, 2018 10:56 am
Forum: PowerShell GUIs
Topic: Form stuck in minimized state while loop running?
Replies: 9
Views: 4109

Re: Form stuck in minimized state while loop running?

Yes, my question is basically : why is the form responsive (I can click items fine or manipulate it) but once minimized, it's doomed to stay minimized unless called back via Task Manager? It's as if the click on taskbar event that restores the window is ignored or the window is restored but not visi...
by raphaelgj
Fri Sep 21, 2018 10:40 am
Forum: PowerShell GUIs
Topic: Form stuck in minimized state while loop running?
Replies: 9
Views: 4109

Re: Form stuck in minimized state while loop running?

There is no need to do more, this simple code shows exactly the problem i'm facing, while my loop is running, once I minimize the window, it won't go to normal state again by clicking it in taskbar. Even if the loop did anything else than what is shown here, the behavior is the same. I don't want to...