|
-
Sep 25th, 2013, 06:37 AM
#3
Re: Enumerating Properties of Controls
 Originally Posted by Doogle
I've been playing with Typelib Information (TBLINF32.DLL) to enumerate the Properties of all the Controls on a Form and determine whether specific ones are Read only.
From what I curently understand, a Prop.InvokeKind of 2 (INVOKE_PROPERTYGET) means it's a Readable property and a Prop.InvokeKind of 4 (INVOKE_PROPERTYPUT) means it's Writeable.
The issue is that, for example, the 'Height' property of a ComboBox is read only, yet the results above suggest it's Read/ Write. If you note, the ListIndex Property does not have a Prop.InvokeKind of INVOKE_PROPERTYPUT which is what I would expect.
Am I missing something or is there a 'better' way to achieve the objective? (apart from attempting to assign a value to the Property and using in-line Error Handling to trap errors)
BTW The overall objective is to attempt to build a 'generic' Form Resize Class / Module (yes,I know it's been done a thousand times before, but I've never done it- this is an exercise for me rather than anything 'useful') and in order to do so it's required to be able to identify whether a particular Property exists (e.g.Height) and whether it's writable.
How do you figure, that Height would be read-only for a combobox? Or that you would expect that ListIndex is read-only, since in your example above i can clearly see a LISTINDEX 4, which suggests writable. Or did you mean ListCount?
I've been setting Height and ListIndex for a ComboBox during Runtime since Adam & Eve...
Last edited by Zvoni; Tomorrow at 31:69 PM.
----------------------------------------------------------------------------------------
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------------------
People call me crazy because i'm jumping out of perfectly fine airplanes.
---------------------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|