Search found 14925 matches

by jvierra
Sat Sep 18, 2021 1:29 pm
Forum: PowerShell
Topic: Outlook COM Mark email as read
Replies: 17
Views: 4989

Re: Outlook COM Mark email as read

As there are many approaches to doing this as long as you don't try to enumerate teh collection in a loop. Using the index of the collection in reverse will avoid the issue. I would use more direct methods that don't create new refernces to teh COM objects. Every time you store a reference then it i...
by jvierra
Sat Sep 18, 2021 12:32 am
Forum: PowerShell
Topic: Outlook COM Mark email as read
Replies: 17
Views: 4989

Re: Outlook COM Mark email as read

Yes, you can reverse enumerate any stable collection. "Folder" items are stable collections and remain stable under reveres enumeration and change.
by jvierra
Fri Sep 17, 2021 7:35 pm
Forum: PowerShell
Topic: Outlook COM Mark email as read
Replies: 17
Views: 4989

Re: Outlook COM Mark email as read

"Delete" and "unread" change the members of the collection. As I noted this will cause members to be skipped as the collection pointer (index) is changing. Since the beginning of COM we have always retrieved the index of the collection then just loop through the indexes and change teh object. The in...
by jvierra
Fri Sep 17, 2021 2:32 pm
Forum: PowerShell
Topic: Outlook COM Mark email as read
Replies: 17
Views: 4989

Re: Outlook COM Mark email as read

Nothing wrong, that is how COM objects work always. Note that a COM you create is just a proxy for another actives process. If you interact and change things the proxied process will do dynamic adjustments to teh changes. This is true for all COM activations. Most people who are not trained in compu...
by jvierra
Wed Sep 15, 2021 8:13 am
Forum: PowerShell
Topic: ComboBox input to DataGridView
Replies: 5
Views: 633

Re: ComboBox input to DataGridView

Also note that global does not define any control. It is just a blank file that you can use to create global variables. Controls on a form do not need to be defined as "global" and the code you are writing should not declare simple variables as "global". With Sapien PSS the control variables are def...
by jvierra
Wed Sep 15, 2021 8:04 am
Forum: PowerShell
Topic: ComboBox input to DataGridView
Replies: 5
Views: 633

Re: ComboBox input to DataGridView

Again, the code posted is dependent on the whole of the DGV configuration. WIthout all of the settings then there is no way to know what is happening. Start simple. Create a simple form with a DGV and change no settings. Add one button and add the code you just posted. When working just remove all p...
by jvierra
Tue Sep 14, 2021 2:36 pm
Forum: PowerShell
Topic: ComboBox input to DataGridView
Replies: 5
Views: 633

Re: ComboBox input to DataGridView

First from what you posted I can only say that is not what a DGV is used for or how to use it. A DGV takes objects or object collections and not strings. If you are using the object obtained from an AD query then the object has property names wich much match the column's "DataMember" name. In your p...
by jvierra
Mon Sep 13, 2021 7:37 pm
Forum: PowerShell
Topic: Group Policy Module not loading in memory
Replies: 2
Views: 522

Re: Group Policy Module not loading in memory

The first thing to consider is that WS2008 has been obsolete and unsupported for years. The GP CmdLets no longer match the WS2008 API level. While V5 will run on any version of Windows the modules won't. The GP Module was built fro a later version of Windows Server and teh GP subsystem was changed m...
by jvierra
Thu Sep 09, 2021 1:35 am
Forum: PowerShell GUIs
Topic: Control width vs column width
Replies: 1
Views: 1487

Re: Control width vs column width

There is alwaqys slop with autodisplay scroll bars. Different controls behave differently and differnt screen resolutions also cause differences. You might want to check in the C# WinForms forum to see if anyone knows if there is documentation that has sorted all of that out. Normally I have just ad...
by jvierra
Wed Sep 08, 2021 1:57 pm
Forum: PowerShell GUIs
Topic: DataGridView - How to select header without selecting Cell
Replies: 6
Views: 2362

Re: DataGridView - How to select header without selecting Cell

Have you read the docs on the cell object, row object, row collection and the click events associated with the header? YOu can't expect anyone to remeber deep detail when controls in WInforms have 10,000+ events and thousands of properties and object collections. Always start by reading the document...