In most of my applications I've been using the side bar form with a row of buttons down it. Originally I added a new effect that duplicated the "roll over" effect that you'd see on the Outlook toolbar or on web pages. When your mouse is over the button, the button graphic changes. Plus there are two other graphics when the mouse button is clicked and released (same as the ProjMgr sample). I figured this might be useful to other people so here's what was needed to make it work. Hopefully this makes sense:
Subclass cEffectsBase in the cEffects class, save as cRollOverEffect. I originally stuck this in cEffects which was a really bad idea since it will get overwritten with every update.
Add the following code to the CancelEffect() and SetEffect() methods:
CancelEffect()
-----------
LPARAMETERS tocontrol,tohost
IF !ISNULL(toControl)
toControl.ChangeGraphic(toControl.cMouseUpGraphic)
ENDIF
SetEffect()
------------
LPARAMETERS toObject, toHost
toObject.ChangeGraphic(toObject.cMouseOverGraphic)
Subclass the cGraphicButton in kCustCtl class and add the property cMouseOverGraphic. Set it to a blank space.
Add this code to the MouseMove() method of the Image control:
LPARAMETERS nButton, nShift, nXCoord, nYCoord
ThisForm.MouseOverFX.SetEffect(This.Parent)
I created a container for all my graphic buttons then added this container to the side bar form. In the SideBarForm MouseMove() method add:
LPARAMETERS nButton, nShift, nXCoord, nYCoord
ThisForm.MouseOverFx.CancelEffect()
ThisForm.MouseOverFx.oCurrentControl = .NULL.
Add this same code to the MouseMove() method if you use a SideBarButton container like I do.
Now for the roll over effect just fill in the cMouseOverGraphic, cMouseUpGraphic and cMouseDownGraphic properties with the appropriate graphics.