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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Programatically Setting an Image on Tab Control

Status
Not open for further replies.

pcdaveh

Technical User
Sep 26, 2000
213
US
Does anyone know how to Programatically Set an Image on Tab Control.

Examples:
on a form this works
Me.Picture = "\\Devsql2001\Dev_Team\Reports_Online\Files_Images\Working_Directory\NewForms_IT\GIFS\test.gif"

on a tab control
This doesn't work
me.TabCtl0.Pages(1).Picture = "\\Devsql2001\Dev_Team\Reports_Online\Files_Images\Working_Directory\NewForms_IT\GIFS\test.gif"
 
The property you are trying to set is for an icon on the tab itself. I believe the only formats supported for this property are .bmp and .ico, and if the image is too large it will distort the size of the tab.

If you want an image on each page of the tab control it would be easier to put an image control on each page and change those images. You can also set the tab control's BackStyle property to Transparent to show an underlying image on all pages.

I have used icons on my tabs before but don't like to use them because Access doesn't mask the transparent areas of the icons properly, so if the user changes their 3D objects system colors the icons don't look right - they retain whatever 3D color was being used when the icons were set.

Good Luck,

VBSlammer
redinvader3walking.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top