|
-
Jun 2nd, 2000, 02:33 AM
#1
Thread Starter
Lively Member
I'm trying to get an idea of how most people would like to change VB's intrinsic controls (i.e. Form, MDI Form, Usercontrol, Menu, ListBox, ComboBox, etc.). There are many class modules out there that can add functionality to a form. Mostly, I'm thinking of what kinds of events VB could really use. Such as events for these messages:
To forms:
Properties: AlwaysOnTop, InTaskbar (one that can be changed at runtime)
Events:
[Window related]
WM_SHOWWINDOW (sent when window is shown or hidden)
WM_SIZING,
WM_ENTERSIZEMOVE,
WM_EXITSIZEMOVE (sent by the modal message loop during window dragging and resizing)
WM_ENABLE,
WM_DISABLE (obvious purpose)
[System messages that toplevel windows normally get]
WM_SETTINGCHANGE (sent when you change a Display setting, be it the screen size, or one of the settings in the Appearances tab)
WM_POWERBROADCAST (let your program be aware of power status and let it allow or reject Suspend requests!)
WM_COMPACTING (how about if your program could detect if your computer being overworked and respond accordingly?)
*********************************************************
To menus:
General:
This could be implemented very similar to a treeview control - the structure of a menu is essentially identical to that of a tree. That would make adding menus at runtime a snap 
Properties:
CheckedBitmap (as long, for bitmap handle)
UncheckedBitmap (as long, for bitmap handle)
OwnerDrawn (as boolean)
BarBreak (as boolean)
MenuBarBreak (as boolean)
RadioCheck (as boolean, shows radio dot instead of checkmark)
Align (Left, Center, or Top)
Default (as boolean, shows item as bold)
Highlighted (as boolean)
Events:
WM_DRAWITEM (sent to the parent to draw an item - for owner-drawn menus)
WM_INITMENUPOPUP (sent just before Windows displays a menu; good for disabling inappropriate commands - i.e. Cut/Copy when no text selected)
WM_UNINITMENUPOPUP (sent after the menu is closed; good for undoing changes done by WM_INITMENUPOPUP)
**********************************************************
To ComboBoxes:
General: I've always thought that combo boxes should be passable to procedures expecting Listboxes and Editboxes. After all, a Combo Box implements all the functionality of both; why shouldn't this be possible?
**********************************************************
These are just some of the things I've thought about when I tried to do something that is easy using API but is nearly or absolutely impossible in "regular" VB. I'm not talking about complex things like adding call-by-address support and multiple inheritance - I'm talking about simple things like throwing a few key events into the fray. Most of our intrinsic controls have the very same capabilities they did in VB 1.0 - it's really time for that to change.
I would really appreciate suggestions - that means vent all your pet peeves about VB's controls, folks.
- Steve
Real programmers use COPY CON PROGRAM.EXE
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
|