Search found 14200 matches

by jvierra
Fri Mar 27, 2020 10:51 am
Forum: Windows PowerShell
Topic: MS SQL and Powershell Studio
Replies: 4
Views: 126

Re: MS SQL and Powershell Studio

I just ran your code with my changes in PowerShell Studio and it ran just fine.
by jvierra
Fri Mar 27, 2020 10:31 am
Forum: Windows PowerShell
Topic: MS SQL and Powershell Studio
Replies: 4
Views: 126

Re: MS SQL and Powershell Studio

SQlReader does not have rows in the normal sense. It has to be moved forward with a "read()" command then the data for a row is available. The object can only be read once then it must be closed and reopened to use it again. There is no need to use the reader. Just load the DataTable and you can the...
by jvierra
Fri Mar 27, 2020 8:34 am
Forum: PowerShell GUIs
Topic: ownerDrawText - checkboxes are messed
Replies: 4
Views: 56

Re: ownerDrawText - checkboxes are messed

Unfortunately there is no Paint event for nodes. That is where you would reset any node.
Also there is no way to understand what it is you are seeing without the code.
by jvierra
Fri Mar 27, 2020 7:50 am
Forum: PowerShell GUIs
Topic: ownerDrawText - checkboxes are messed
Replies: 4
Views: 56

Re: ownerDrawText - checkboxes are messed

Just do this:

Code: Select all

$treeview1_DrawNode=[System.Windows.Forms.DrawTreeNodeEventHandler]{
#Event Argument: $_ = [System.Windows.Forms.DrawTreeNodeEventArgs]
	$_.Node.BackColor = 'Aqua'
}
by jvierra
Fri Mar 27, 2020 7:46 am
Forum: PowerShell GUIs
Topic: ownerDrawText - checkboxes are messed
Replies: 4
Views: 56

Re: ownerDrawText - checkboxes are messed

Why not just set the nodes color?
by jvierra
Wed Mar 25, 2020 10:44 pm
Forum: PowerShell GUIs
Topic: How to prevent child form closing after click on a button in child form.
Replies: 8
Views: 145

Re: How to prevent child form closing after click on a button in child form.

All of that is unnecessary and is not how Forms are designed to be used. This misunderstanding will cause you many headaches as you continue to use forms. Just remove the Dialog result from all buttons and if you want to close the form in a button then just call $fome.Close(). I recommend reading th...
by jvierra
Wed Mar 25, 2020 10:39 pm
Forum: PowerShell GUIs
Topic: How to prevent child form closing after click on a button in child form.
Replies: 8
Views: 145

Re: How to prevent child form closing after click on a button in child form.

If a button has a dialog result set then it will close the form. Be sure that you have not set a "DialogResult" on any buttons that you don't want to close a form.
by jvierra
Wed Mar 25, 2020 10:18 pm
Forum: PowerShell GUIs
Topic: How to prevent child form closing after click on a button in child form.
Replies: 8
Views: 145

Re: How to prevent child form closing after click on a button in child form.

You cannot both close a child form and keep it open. When you close the form it closes and control is returned to the parent form. There is no other option.
by jvierra
Wed Mar 25, 2020 8:53 pm
Forum: PowerShell GUIs
Topic: How to prevent child form closing after click on a button in child form.
Replies: 8
Views: 145

Re: How to prevent child form closing after click on a button in child form.

You cannot return a value like that from a child form. Use the global variables created by child forms.

See: https://info.sapien.com/index.php/guis/ ... sing-forms
by jvierra
Wed Mar 25, 2020 6:47 pm
Forum: Windows PowerShell
Topic: Problem passing Arguments to Win10 Secondary Tile App
Replies: 3
Views: 158

Re: Problem passing Arguments to Win10 Secondary Tile App

If you want the Windows 10 settings page for that:

Start-Process 'ms-settings:bluetooth'