Search found 15436 matches
- Tue Nov 21, 2023 11:27 am
- Forum: PowerShell
- Topic: Function parameter based on value of another parmeter
- Replies: 3
- Views: 10381
Re: Function parameter based on value of another parmeter
It is just like any other function. Pass an object. Design the object to have all of the properties and dependencies you need.
- Fri Nov 17, 2023 8:10 pm
- Forum: PowerShell
- Topic: Function parameter based on value of another parmeter
- Replies: 3
- Views: 10381
Re: Function parameter based on value of another parmeter
The correct method of handling cases like this is to pass an object that correctly maintains its properties. Once the object knows itself and can maintain the internal requirements then the function becomes trivial. Don't use old linear code methods in an object system, It will only make the coding ...
- Wed Nov 08, 2023 5:44 pm
- Forum: PowerShell GUIs
- Topic: Combobox selection problem with multiple variable elements per line
- Replies: 3
- Views: 4091
Re: Combobox selection problem with multiple variable elements per line
Adapter objects show up as a linked list of objects. You can query each down the list. I would get the ID and just get the base adapter object which has all adapter properties. Adapter configurations are stored sepaarately, I recommend reviewing both the WMI and the CIM models as there are many good ...
- Tue Nov 07, 2023 2:27 pm
- Forum: PowerShell GUIs
- Topic: ContextMenu and toolstripmenu items fore color
- Replies: 6
- Views: 6018
Re: ContextMenu and toolstripmenu items fore color
Those colors are set by the system. That means always redrawing everything in the combobox on every redraw command. . You would have to use an "OwnerDraw" combo.
Spend some time reading the dos on combo. Some just use an RtB like it is a CB.
Spend some time reading the dos on combo. Some just use an RtB like it is a CB.
- Tue Nov 07, 2023 2:16 pm
- Forum: PowerShell GUIs
- Topic: Combobox selection problem with multiple variable elements per line
- Replies: 3
- Views: 4091
Re: Combobox selection problem with multiple variable elements per line
All of those elements are separated as properties on the adapter object. Just reference them as needed.
- Mon Oct 30, 2023 4:03 pm
- Forum: PowerShell GUIs
- Topic: Using recycled OK and Exit buttons in a single form.
- Replies: 5
- Views: 5622
Re: Using recycled OK and Exit buttons in a single form.
The code for any event can be removee, edited or replaced using code any time you need to change a controls behavior.
You can also easily use an "if" to handle multiple tasks.
You can also easily use an "if" to handle multiple tasks.
- Fri Oct 06, 2023 4:01 pm
- Forum: PowerShell GUIs
- Topic: Combobox value member from Sql database
- Replies: 7
- Views: 7224
Re: Combobox value member from Sql database
Strange behaviour and not what I'm used to when working with winforms without PSS in the past but I can live with it especially as I don't need to write several lines of code as a workaround any more :) I recommend reviewing the docs on WinForms, the "Control" class and each control you are having ...
- Fri Oct 06, 2023 9:28 am
- Forum: PowerShell GUIs
- Topic: Combobox value member from Sql database
- Replies: 7
- Views: 7224
Re: Combobox value member from Sql database
What property are you calling the "ValuMemberr". Tat is only availab;e after a change takes place.
TO get teh value in the "Combo's text display box" use the "Text" property.
TO get teh value in the "Combo's text display box" use the "Text" property.
- Fri Oct 06, 2023 12:41 am
- Forum: PowerShell GUIs
- Topic: Combobox value member from Sql database
- Replies: 7
- Views: 7224
Re: Combobox value member from Sql database
you are assuming that "UniqueId" is a string.
Run the "Invoke" at a prompt and inspect the returned objects.
Run the "Invoke" at a prompt and inspect the returned objects.
- Tue Sep 19, 2023 4:28 pm
- Forum: PowerShell GUIs
- Topic: Dynamically adjust location of control
- Replies: 3
- Views: 3720
Re: Dynamically adjust location of control
Here is a more flexible method that is a generalization of what most of us use.