Search found 14980 matches

by jvierra
Sun Nov 28, 2021 8:49 pm
Forum: PowerShell GUIs
Topic: $Treeview focus
Replies: 5
Views: 226

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: 151

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: 11
Views: 982

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: 1
Views: 161

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: 260

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
by jvierra
Wed Nov 24, 2021 5:22 pm
Forum: PowerShell
Topic: How to delete my .EXE script just before exit it?
Replies: 8
Views: 496

Re: How to delete my .EXE script just before exit it?

I have used TS in the past to divorce processes and have not always found it that reliable and you have to deal with credentials. But thats fine, the good thing with powershell and MS...you have loads of choices. Not true under the question was asked and, in both cases, you would require credential...
by jvierra
Tue Nov 23, 2021 10:05 pm
Forum: PowerShell
Topic: How to delete my .EXE script just before exit it?
Replies: 8
Views: 496

Re: How to delete my .EXE script just before exit it?

Sounds like too many operations when you can just schedule a one shot and exit the program. THat does everything you are doing in one line.

Why write ten times as much code as necessary?
by jvierra
Tue Nov 23, 2021 6:37 pm
Forum: PowerShell
Topic: How to delete my .EXE script just before exit it?
Replies: 8
Views: 496

Re: How to delete my .EXE script just before exit it?

You could try this.. # # do stuff # # remove self $Self = (Get-Process -Id $pid).Path $Exe = 'powershell.exe' $ExeArgs = '-command {remove-item '+$Self+' -force}' start-process powershell -ArgumentList "sleep 1; $Exe $ExeArgs" -WindowStyle hidden This is the original issue. You cannot delete a proc...
by jvierra
Mon Nov 22, 2021 11:13 pm
Forum: PowerShell GUIs
Topic: $Treeview focus
Replies: 5
Views: 226

Re: $Treeview focus

  1. # Move focus to the first root node.
  2. $treeList1.FocusedNode = $treeList1.Nodes[0]
by jvierra
Wed Nov 17, 2021 5:18 am
Forum: PowerShell GUIs
Topic: dgv cell click setting column header selection state
Replies: 11
Views: 418

Re: dgv cell click setting column header selection state

Here is some more good background on app.config files, how they are used and how they cannot be eliminated. There is actually no way to eliminate them. If you ship an exe without an app.config the EXE will create one the first time it is run. The short article has two links to more detailed informat...