Sunday, July 26, 2009

How do I program Browser Tabs in C# similare to IE7 or FireFox?

I have been trying to find an example somewhere that would show me how I could program tabs in C# similar to the tabs in IE7 or even FireFox but I cant find any. I use Visual Studio 2008 C# Express Edition. Does anybody know of a good example somewhere in C#?

How do I program Browser Tabs in C# similare to IE7 or FireFox?
Hello,





They do not use the default control similar to what .NET provided, they custom made the Tab as a control. IE7 and Firefox do not use C#, they use C++ so they created their own Custom Tab Control.





If you wish to replicate this control in C# and produce the same look and feel of the Tabs, then you will need to learn about creating custom C# controls.





You would need to inherit the Control class and provide your own implementation of the OnPaint event handler. If you wish to use user input, then you need to handle that as well.





That is the only way to do Custom Controls, and that is how they do all the neat controls in the workplace. Read this tutorial on how to create a very simple control, http://www.ondotnet.com/pub/a/dotnet/200... , they will show you how to create a custom circular button. You can follow the same steps and draw a tabular version of the control like IE7 instead of a circle. Obviously it isn't a beginner like problem since there are many curves, actions, and special stuff to do but it is awesome learning step.





Good Luck.

gift

No comments:

Post a Comment