Search found 13568 matches

by jvierra
Wed Jun 05, 2019 7:31 am
Forum: PowerShell GUIs
Topic: Unable to get datagrid updated.
Replies: 9
Views: 160

Re: Unable to get datagrid updated.

You are not returning any data in you code so the variable is null. THat is what the error message is telling you.
by jvierra
Wed Jun 05, 2019 7:11 am
Forum: Windows PowerShell
Topic: powershell core 6.x
Replies: 5
Views: 350

Re: powershell core 6.x

I just ran PS 7 in PowerShell Studio with a simple PSF. It works and builds and runs with PS 7. There is a deficiency in Net Core 3.0 which will be fixed before release. All assignments of strings to "point" types fails because Net Core 3 has not been completed. There are a few modules that are miss...
by jvierra
Wed Jun 05, 2019 6:44 am
Forum: PowerShell GUIs
Topic: Unable to get datagrid updated.
Replies: 9
Views: 160

Re: Unable to get datagrid updated.

The following line is wrong:
$datagridview1.Rows.Add($Results)

It should be:
$datagridview1.Rows.AddRange($Results)
by jvierra
Tue Jun 04, 2019 11:45 pm
Forum: PowerShell GUIs
Topic: Modules for classes
Replies: 4
Views: 141

Re: Modules for classes

PowerShell cannot run multi-threaded forms. PS has only one thread. This also means that creating complex UIs can be impossible. As long as you only need basic Windows Dialogs windows then it is a good way to build simple tools. I definitely agree that code should be maintainable by other than the p...
by jvierra
Tue Jun 04, 2019 3:00 pm
Forum: Windows PowerShell
Topic: powershell core 6.x
Replies: 5
Views: 350

Re: powershell core 6.x

PowerShell 7 Preview based on Net Core 3.0 does have direct support for WinForms. The preview is fairly complete with some missing items when using WinForms code. It appears that it will become the Microsoft replacement for PowerShell 5.1 and will move Windows PowerShell into the public domain. See:...
by jvierra
Tue Jun 04, 2019 2:54 pm
Forum: PowerShell GUIs
Topic: Modules for classes
Replies: 4
Views: 141

Re: Modules for classes

The use of classes in PowerShell is mostly for support for DSC. Classes can be used as needed. The choice of classes as an element of your design is optional. Classes can be declared in any file or module. It all depends on what you are trying to accomplish. I recommend against attempting to directl...
by jvierra
Mon Jun 03, 2019 9:17 pm
Forum: PowerShell GUIs
Topic: formatting the size text in datagridview
Replies: 6
Views: 166

Re: formatting the size text in datagridview

I can't reproduce your issue. If I set the property in the designer and build the script it has the font and color that I set.
by jvierra
Mon Jun 03, 2019 1:29 pm
Forum: PowerShell GUIs
Topic: formatting the size text in datagridview
Replies: 6
Views: 166

Re: formatting the size text in datagridview

No. You cannot set the size. You must create a font and set the "font" property to the new font.

Start by doing it in the designer and inspect the code that is produced to see how this is done.
by jvierra
Mon Jun 03, 2019 12:36 pm
Forum: PowerShell GUIs
Topic: Datagridview |Fill colunm |keep the button
Replies: 1
Views: 83

Re: Datagridview |Fill colunm |keep the button

$DataGridView.DataSource = ConvertTo-DataTable $csv