Hello,
I'm having a problem with a TabControl and VisualStyles. My tabcontrol contains images on each tab, which appear at design time, but when I run the application the images are missing and only the text appears on the tabs. Does tabcontrol support images when using VisualStyles My alignment is set to "Top" if that makes a difference.
Thanks
Simon

Images do not appear on TabControl when using VisualStyles
fbrian
Ryan Lamansky / Kardax
Is this .NET 1.1 There was a bug in that version where images wouldn't show if you used EnableVisualStyles.
As a work around, you have to call DoEvents:
Application.EnableVisualStyles();
Application.DoEvents();
Application.Run(new Form1());
haricharan
That bug is a real mystery, the best information I could find is that it depends on the order in which handles are created: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=50707&SiteID=1
To repeat, this has been fixed in .NET 2.0!
_MRCHINGON_
I seem to have fixed the problem I was having. I am also using VS2005, but with top alignment.
What I suggest you do is call Application.EnableVisualStyles() before you run your application, check out the code below:
static void Main(){
Application.EnableVisualStyles(); Application.DoEvents(); Application.Run(new MyForm());}
this worked for me, so it may work for you to.
Cheers
mark87544
I am using
- VS 2005
- Application.EnableVisualStyles();
- tabControl (left alignment) with picture and text
Result:
- Picture is displayed but not the text
I have noticed similar symptom in 1.1.
http://support.microsoft.com/ kbid=905721
Seems like its not fixed in 2.0 either.
Is there any workaround (Without loosing any functionality)
cathy kmh