Windows Forms TabControl BackColor VS 2005

How can I set the backcolor of the TabControl container to Transparent?

Even with padding set to 0, the tabs have a couple of pixels of gray system color to the right or top of the tab itself. Since I have the tab sitting on a form with a gradient, these artifacts are really visible and look ugly.

Can someone tell me how to solve this problem?

Thanks in advance,
Kevin McElhiney
KMcElhineyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

KMcElhineyAuthor Commented:
Roshmon,

I'm working in Framework 2.0.  This code appears to use C# 3.0 constructs, e.g. the "op_Implicit" method.

Any idea how to convert it to 2.0 code?

Thanks,
Kevin

0
Roshan DavisCommented:
lloks like that class mainly using Windows Messages and programming. Shouldn't make much difference in the old framework. Could you please tell me where exactly are you getting error?
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

KMcElhineyAuthor Commented:
Roshmon,

I created a little test project and copied the code for the overridden TabControl class.

I fixed the problem with the use of "op_Implicit" by changing the code to read:

new RectangleF(new PointF(0.0F, 0.0F), r.Size)

Now I'm getting a null reference exception In the overridden WndProc function:

SelectedIndexChanging(this, e);

This generates a null reference exception.

You will probably have to create a test project to see this problem.

Kevin
0
Roshan DavisCommented:
WndProc is only needed if you need the event SelectedIndexChanging. Can you try to comment out the WndProc and see that is this the right transparent control you needed?
if yes, we can make changes to make it work.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
KMcElhineyAuthor Commented:
Typical Roshmon answer, not much explanation. I just want to close this and move on.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.