Search found 14071 matches

by jvierra
Tue Jan 14, 2020 7:20 am
Forum: Windows PowerShell
Topic: Windows Service - Stop Service - Restart Service
Replies: 7
Views: 957

Re: Windows Service - Stop Service - Restart Service

Services cannot display a UI because they are not run in an interactive session.
by jvierra
Sun Jan 12, 2020 11:24 am
Forum: PowerShell GUIs
Topic: Datagridview
Replies: 5
Views: 210

Re: Datagridview

Yup. I did the same thig the first time I used the DGV.

It is always the best approach to review the online docs for any control you plane to use. It will save you a lot of wasted time.
by jvierra
Sun Jan 12, 2020 11:09 am
Forum: PowerShell GUIs
Topic: Datagridview
Replies: 5
Views: 210

Re: Datagridview

You have to make the data name the same as the column name. Just changing the display name won't bind the column to the column.
by jvierra
Sun Jan 12, 2020 10:37 am
Forum: PowerShell GUIs
Topic: Datagridview
Replies: 5
Views: 210

Re: Datagridview

You have to add the columns after you import or pre-create all columns matching the names in the CSV,
by jvierra
Fri Jan 10, 2020 4:32 am
Forum: PowerShell GUIs
Topic: Can I move GroupBox from a tab to another tab in TabControl?
Replies: 3
Views: 222

Re: Can I move GroupBox from a tab to another tab in TabControl?

You can copy it from the controls collection on one tab to the controls collection on another tab using the "CopyTo" method of the collection.
by jvierra
Fri Jan 10, 2020 3:40 am
Forum: PowerShell GUIs
Topic: Incorrect loop execution on Windows 10
Replies: 3
Views: 175

Re: Incorrect loop execution on Windows 10

The correct way to test a controls contents is like this: This: if(($textbox2.Text -eq "") -or ($textbox2.Text -eq $null)) Should be this: if($textbox2.Text){ When designing logic we should always try to use positive testing and not negative as it is easier to understand and lees prone to errors. He...
by jvierra
Thu Jan 09, 2020 6:35 pm
Forum: Windows PowerShell
Topic: Unable to show Windows Event Source & Username?
Replies: 4
Views: 456

Re: Unable to show Windows Event Source & Username?

The server is part of the record. Just add it. It is called "MachineName". Yes I know the levels. They exist in every record. Level < 4 means show all level that are less than 4. "User" is not part of every event's system properties. I think you really want "ProviderName" and "UserId" The following ...
by jvierra
Thu Jan 09, 2020 5:06 pm
Forum: Windows PowerShell
Topic: Unable to show Windows Event Source & Username?
Replies: 4
Views: 456

Re: Unable to show Windows Event Source & Username?

Those names are only part of the individual members of the group. Each group member will be different. You are only enumerating the groups and assuming that a group has more than one member and less than 3 where a group can have any number of members more than one. The logic and assumptions you are ...
by jvierra
Tue Jan 07, 2020 12:08 am
Forum: PowerShell GUIs
Topic: Event on tab or mouse click?
Replies: 2
Views: 200

Re: Event on tab or mouse click?

I recommend reading about the controls and how to use them in the Sapien info center.
Here is how to use a ComboBox control: http://info.sapien.com/index.php/guis/g ... ox-control

The control articles are quickly available by right clicking on the control in the toolbox.
by jvierra
Sun Jan 05, 2020 5:25 pm
Forum: PowerShell GUIs
Topic: Vscrollbar in Treeview
Replies: 11
Views: 578

Re: Vscrollbar in Treeview

Oh. I thought you were asking how to synchronize the scroll bars. You are just trying to select the nodes.

To select nodes you don't need an array. Just select the nodes as they occur in the tree by getting the direction of scroll.