Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Image Control Zorder

Status
Not open for further replies.

robdon

Programmer
May 21, 2001
252
ES
Hi,

I want to be able to place an image ontop of other controls.

I have my image (its a gif with a transparent background) in an image control, but for some reason I cannot get it to appear on controls, its always 'behind' the control.

I have tried changing the Zorder, but that did not help.

I also tried using a Picture box, but I cannot find out how to make the background of a picture box transparent.

Anyone any ideas?

Thanks,

Rob Donovan.
 
In the IDE, you have "send to back" and "bring to front" capabilities. These two options may be found under the Format->Order menu options. You may find these helpful.

I have also encountered difficulty getting some controls to come in front of others, one example is I can't get a Forms 2.0 combo box to show in front of a MSFlexGrid. In these cases, I created a frame, put the combo box on the frame, and because the frame can come in front of the MSFlexGrid, it brings the combobox with it.
Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein


 
From the docs it is apparent that you can't get an image by itself into the front layer. Maybe you can find a way to make a picture control or frame control transparent but it will be through API calls I believe.
ZORDER
"Three graphical layers are associated with forms and containers. The back layer is the drawing space where the results of the graphics methods are displayed. Next is the middle layer where graphical objects and Label controls are displayed. The front layer is where all nongraphical controls like CommandButton, CheckBox, or ListBox are displayed. Anything contained in a layer closer to the front covers anything contained in the layer(s) behind it. ZOrder arranges objects only within the layer where the object is displayed.
?
Generate Forms/Controls Resizing/Tabbing Class
Compare Code (Text)
Generate Sort Class in VB or VBScript
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top