Just a short Demo, to show how to write Alpha-aware, Windowless-Controls,
using Cairo-Drawing against a (Control-covering) BackBuffer-Surface (avoiding
AutoRedraw on the Control itself).
Note, that this is not using the RC5-WidgetEngine (which allows windowless controls
as well, but implemented in normal VB6-Classes) - here a normal VB6 (Project-Private)
Usercontrol is sufficient (only making use of the Raw-Drawing-capabilities of Cairo internally).
Tried for a BareBones-approach to keep the example easy to understand
(the whole Demo is only about 80 lines of code total).
What's interesting maybe (aside from the Cairo-Drawing), is the usage of the
RC5-Properties Enumerator, which allows (in a generic way) to write and read the 3
Properties of the Control (Alpha, ImgKey and Moveable) to and from the PropertyBag.
ScreenShot:
![]()
And Download-Link:
WindowlessControlsCairo.zip
Have fun,
Olaf
using Cairo-Drawing against a (Control-covering) BackBuffer-Surface (avoiding
AutoRedraw on the Control itself).
Note, that this is not using the RC5-WidgetEngine (which allows windowless controls
as well, but implemented in normal VB6-Classes) - here a normal VB6 (Project-Private)
Usercontrol is sufficient (only making use of the Raw-Drawing-capabilities of Cairo internally).
Tried for a BareBones-approach to keep the example easy to understand
(the whole Demo is only about 80 lines of code total).
What's interesting maybe (aside from the Cairo-Drawing), is the usage of the
RC5-Properties Enumerator, which allows (in a generic way) to write and read the 3
Properties of the Control (Alpha, ImgKey and Moveable) to and from the PropertyBag.
ScreenShot:

And Download-Link:
WindowlessControlsCairo.zip
Have fun,
Olaf