Search found 14985 matches

by jvierra
Sat Dec 04, 2021 10:30 pm
Forum: PowerShell GUIs
Topic: Checkbox flatappearance.checkedbackcolor didn't work
Replies: 4
Views: 459

Re: Checkbox flatappearance.checkedbackcolor didn't work

Please read the following link very carefully. Be aware that the backcolor of the Checkbox is dynamic and sets only when the CheckBox is checked AND COMMITED
https://stackoverflow.com/questions/544 ... or-uncheck.
by jvierra
Tue Nov 30, 2021 11:26 pm
Forum: PowerShell GUIs
Topic: Button Yes No
Topic: Button Yes No
Replies: 5
Views: 256

Re: Button Yes No

You have to follow all of the instructions in my reply. The code is not the problem. First learn basic PowerShell then spend some time learning WinForms. Guessing will just waste your time. The button is likely set to return a dialog result. Remeber we can't see your sreen or yuour code and we canno...
by jvierra
Tue Nov 30, 2021 9:48 pm
Forum: PowerShell GUIs
Topic: Button Yes No
Topic: Button Yes No
Replies: 5
Views: 256

Re: Button Yes No

Because you are blindly copying things from teh Internet you are using code that is either unnecessary or code that won' work in WInForms. $buttonLater_Click={ switch ([System.Windows.MessageBox]::Show('Do you want to complete later?', 'Confirm', 'YesNo', 'Warning')){ 'Yes' { $dt = Get-Date -Format ...
by jvierra
Tue Nov 30, 2021 9:35 pm
Forum: PowerShell GUIs
Topic: Button Yes No
Topic: Button Yes No
Replies: 5
Views: 256

Re: Button Yes No

Be sure the button properties do not define a DialogResult. By default, a button may be defined to terminate the form.
by jvierra
Tue Nov 30, 2021 2:52 pm
Forum: PowerShell GUIs
Topic: posh studio EXE gets an ODBC connection error
Replies: 13
Views: 1220

Re: posh studio EXE gets an ODBC connection error

See "help about scopes" It doesn't matter where you put it, the object has to be "in scope". and object declared in a module or function will dispapear from all scopes when the function exits. It is better to vae a function that returns a connection object or, better, a function that returns a Data...
by jvierra
Sun Nov 28, 2021 8:49 pm
Forum: PowerShell GUIs
Topic: $Treeview focus
Replies: 5
Views: 336

Re: $Treeview focus

Again, start with the docs. You can clear a set object by assigning the object reference to "$null"
by jvierra
Sun Nov 28, 2021 3:32 pm
Forum: PowerShell GUIs
Topic: Programatically add a new row to a databound datagridview.
Replies: 2
Views: 207

Re: Programatically add a new row to a databound datagridview.

Just add a new row to the DataTable object. See docs for DataTable and examples of how to add a row.
by jvierra
Fri Nov 26, 2021 10:45 pm
Forum: PowerShell GUIs
Topic: posh studio EXE gets an ODBC connection error
Replies: 13
Views: 1220

Re: posh studio EXE gets an ODBC connection error

I was pretty sure that was the issue as it is quite common. See "help about scopes" to understand how "scope" is implemented in PowerShell.

And Happy Thanksgiving to you too. Watch out for the cranberries...they can be a challenge.

Observe the following: https://www.youtube.com/watch?v=8MuhFxaT7zo
by jvierra
Fri Nov 26, 2021 11:57 am
Forum: PowerShell GUIs
Topic: Checkbox flatappearance.checkedbackcolor didn't work
Replies: 4
Views: 459

Re: Checkbox flatappearance.checkedbackcolor didn't work

You can't change the color after the checkbox has been displayed. Set the color in the properties of the control.
by jvierra
Fri Nov 26, 2021 11:52 am
Forum: PowerShell GUIs
Topic: Get value of cell based on another cell from datagridview
Replies: 2
Views: 355

Re: Get value of cell based on another cell from datagridview

Use the column name and not the index. The index is transient and the name always specifies the correct column.

$datagridviewResultsLogs.SelectedCells['Device'].Value