Intrinsic Control Routines
Updated Monday December 26, 2011
   
Category
Topic
Button
vb6
vb5
vb4-32
SetWindowLong: Changing Button Caption Alignment (non-graphical only)
Using SetWindowLong to alter the alignment of button captions.  Jan 11.2003

Determining the Selected Button in any Option Button Control Array
Pass any option button control array, and receive the selected option button index. Dec 7.2003

Pure VB: Mimicking a Command Button ForeColor Property
Use a Check to create a command button providing control over the text colour.  July 12.1999

WM_DRAWITEM: Set Command Button ForeColor
Now command buttons can have their own button text colour.  July 12.1999

SendMessage: Visually Pressing a Command Button Through Code
Two methods to visually simulate a button press; one firing the button's Click event, and the second just giving the visual press feedback. August 21.1999



Check box
vb6
vb5
vb4-32
Pure VB: Simulating a Matrix Checkbox Control Array with a Picture Box
Low-resource code using a picture box to simulate a x/y matrix of check boxes. Jan 15.2003


Combo
(also see Combo section)
vb6
vb5
WM_PAINT: Subclassing to Create a Flat Combo Box
Use the DrawEdge API to alter the appearance of a combo box. Nov 24.1999 (vb6 and vb5 only)

WM_LBUTTONDOWN: Substitute a Tabbed List for a Combo's Dropdown List
Trapping a combo's dropdown and substituting a standard List control supporting tab stops. Mar 16.2001

WM_LBUTTONDOWN: Substitute a ListView for a Combo's Dropdown List
Trapping a combo's dropdown and substituting a standard ListView control. Mar 16.2001



Label
vb6
vb5
vb4-32
ShellExecute: Simulate a Hyperlink with a Label Control 
Simple code using the API to create a hyperlink and react to mouse movement. Feb 18.2000

Pure VB: Centre a Label Within a Container
Tiny routine to vertically and horizontally centre a multi-line label within a form or container control. Feb 12.2000



List Box
vb6
vb5
vb4-32
BitBlt: Present a Non-Selectable 'No Data' Picture in a ListBox
Simulate some of the listview's LVBKIMAGE functionality in a list box.  Nov 29.2003 


ListView
vb6
vb5
WM_LBUTTONDOWN: Substitute a Tabbed List for a Combo's Dropdown List
Trapping a combo's dropdown and substituting a standard List control supporting tab stops. Mar 16.2001

WM_LBUTTONDOWN: Substitute a ListView for a Combo's Dropdown List
Trapping a combo's dropdown and substituting a standard ListView control. Mar 16.2001



Option Button
vb6
vb5
Determining the Selected Button in an Option Button Control Array
Pass any option button control array, and receive the selected option button index. Dec 7, 2003


StatusBar
vb6
vb5
vb4-32
SetParent: Add a VB Toolbar to a VB StatusBar
SetParent and a couple of tweaks adds a VB toolbar into a VB status bar.   Jan 20.2002


Text Box
vb6
vb5
vb4-32
WM_CONTEXTMENU: Kill the Default Combo Box Context Menu
Eliminating the combo edit context menu via subclassing.  Dec 19.2000

WM_CONTEXTMENU: Kill the Default Text Box Context Menu
Eliminating the default textbox context menu via subclassing.  June 6.1999



ToolBar
vb6
vb5
vb4-32
SetParent: Add a VB Toolbar to a VB StatusBar
SetParent and a couple of tweaks adds a VB toolbar into a VB status bar.   Jan 20.2002


 

 
 

PayPal Link
Make payments with PayPal - it's fast, free and secure!

 
 
 
 

Copyright ©1996-2011 VBnet and Randy Birch. All Rights Reserved.
Terms of Use  |  Your Privacy

 

Hit Counter