Hi Louis:
If I understand you correctly then you can do that. The following code loads an image in the Imaging object. It then draws a semi-transparent rectangle over the image. It then displays the image and transparent rectangle in the viewer. Start a new project and put in your license information and the path of the image you are working with.
Code: Select all
Dim nImageID As Long
Dim TranspNum As Long
Call Imaging1.SetLicenseNumber("xxxx")
Call GdViewer1.SetLicenseNumber("xxxx")
TranspNum = 100
GdViewer1.BackColor = vbWhite
nImageID = Imaging1.CreateImageFromFile("C:\mypicture.jpg")
GdViewer1.Height = Imaging1.GetHeight * Screen.TwipsPerPixelY + 100
GdViewer1.Width = Imaging1.GetWidth * Screen.TwipsPerPixelX + 100
Call Imaging1.DrawFillRectangle(0, 0, Imaging1.GetWidth, Imaging1.GetHeight, Imaging1.argb(TranspNum, vbWhite, vbWhite, vbWhite), True)
Call GdViewer1.SetNativeImage(nImageID)
You control the level of transparency of the rectangle by adjusting the TranspNum variable (0-255). If that's not what your looking for then I don't understand what you want.
Tom