>Bernard, I did find what the original problem was. It seems that if the form has a grid on it, adding the lightbox control makes the grid appear as an empty container. That's why when it overlays the grid it appears non-transparent. The effect is the same as when a grid loses its record source.
>
>-m@
Ahh You cannot add controls to a grid, only to the columns in the grid, hence the grid is not your ideal control for this.
The class is very simple. All it does is display a transparent image MyMaskFile.Png and size it to the dimensions provided.
I suggest you
not use this class for your grid but use the image in the downlaod - MyMaskFile.Png and a vfp image class and set its picture to this image. Also set the STRETCH = 2 and visible = .F. Make this a class and add a DisplayLightBox method to it.
In the method you can accept an object as a parameter.
In your code you first size the image to the object size, set Zorder(0) and then make the image.Visiibe = .T. or .F. to show or hide it.
Pretty easy to do. At its simplest would be like this:
LPARAMETERS toObject
WITH this
.Top = toObject.Top
.Left = toObject.Left
.Height = toObject.Height
.Width = toObject.Width
.Zorder(0)
.Visible = NOT .Visible
toObject.Enabled = NOT toObject.Enabled
ENDWITH
and call the above ThisForm.MySplClass.DisplayLightbox(ThisForm.MyGrid)
Note that the code above is a toggle. Call for on call for off.
HTH
Bernard