DEFINE CLASS cmdvmpsuperclass AS commandbutton Height = 27 Caption = "cmdVMPSuperClass" *-- Specifies whether or not an image control (added on the fly) is to be used *-- for displaying the image set in the Picture and DisabledPicture properties. tmlimagefordisplay = .F. Name = "cmdvmpsuperclass" *-- Reload images associated with this object using image controls *-- to load the properly displayed image into cache. PROCEDURE tmdisplayimages *JCJB* See if augmented display behavior is desired. IF this.TMlImageForDisplay *JCJB* Display the images properly for the 4 Picture properties. this.tmDisplayImage('Picture') this.tmDisplayImage('DisabledPicture') this.tmDisplayImage('DownPicture') this.tmDisplayImage('OLEDragPicture') ENDIF ENDPROC *-- Reload a single image associated with this object using an image control. PROCEDURE tmdisplayimage LPARAMETERS tcProperty AS String LOCAL lcPicture AS String, ; lcImage AS String *JCJB* Make sure a valid property is passed. IF VARTYPE(tcProperty) # 'C' OR !PEMSTATUS(this, tcProperty, 5) RETURN .f. ENDIF *JCJB* See if a Picture is specified. IF !EMPTY(this.&tcProperty) *JCJB* Save the current Picture setting. lcPicture = this.&tcProperty *JCJB* Build the Image control name. lcImage = 'TMo' + tcProperty *JCJB* Create an Image control for proper image display. this.AddProperty(lcImage, NEWOBJECT('Image')) *JCJB* Release the picture from this button. this.&tcProperty = '' *JCJB* Clear the copy in cache. This will only be successful if nothing else *JCJB* is using this resource. This means if you have multiple buttons using *JCJB* the same image, you should create multiple copies of the picture with *JCJB* different names and use one for each button. CLEAR RESOURCES (lcPicture) *JCJB* Load the Picture into the Image control for proper display. this.&lcImage..Picture = lcPicture *JCJB* Load the cached copy back onto this button. this.&tcProperty = lcPicture ENDIF ENDPROC PROCEDURE Destroy *JCJB* See if augmented display behavior is desired. IF this.TMlImageForDisplay *JCJB* Release all the Image controls that were added. IF PEMSTATUS(this, 'TMoPicture', 5) this.TMoPicture = null ENDIF IF PEMSTATUS(this, 'TMoDisabledPicture', 5) this.TMoPicture = null ENDIF IF PEMSTATUS(this, 'TMoDownPicture', 5) this.TMoPicture = null ENDIF IF PEMSTATUS(this, 'TMoOLEDragPicture', 5) this.TMoPicture = null ENDIF ENDIF ENDPROC PROCEDURE Init *JCJB* See if augmented display behavior is desired. this.tmDisplayImages() ENDPROC ENDDEFINEThe enhancements were solely for displaying PNGs with proper transparency and alpha blending. The final result is what we were ultimately after by purchasing the images in the first place.