In this article I would like to show you same new controls in the VS.NET 2005 (Whidbey). Microsoft has improved many existing controls and created new ones that have made the design and build of Windows and Web applications very productive and intuitive.
Here I comment the use of some of these new controls developing, in short time, a browser that I called ZeBrowser. The ZeBrowser application has many of the common functionalities of a browser like go forward, back, stop and refresh the page. These new controls have a lot of nice features but the target of this article is only to mention some of them. You can see more VS.Net 2005 images at http://www.byteshift.com/Galeria+de+Fotos/default.aspx.
Using the code
There are many improvements in this new version like VS.Net custom settings, IDE improvements, C# 2.0 with new features, Class Diagram and many others things. If you are interested to see more details, please take a look at http://msdn.microsoft.com/vs2005/. Of course that there are many others links where you can find useful information.
Well, let’s write code. In this project I used only 6 controls:
OpenFileDialog, MenuStrip, ToolStrip, StatusStrip, SplitContainer and the
For backward compatibility reasons, Microsoft has preserved the similar controls of these xxxStrip controls. Let’s go ahead.
This control has a more intuitive behavior from the old one because it already creates two views as you can see in Fig. 2. I used the left view to display the history browse and the right view to accommodate the browser
In the new MenuStrip control, you have 4 predefined controls in one:
MenuItem, ComboBox, Separator and
When you use a xxxStrip control, you will see that it has a little right icon that, when clicked, enable the developer to configure the property control in the control itself as you can see in Fig.3. Also, you can easily add an image to the menuitem as showed in the figure. This obviously enables you to create a friendlier menu.
This control also has a predefined a
TextBox and a
Separator control. Also, a
ToolStrip control can host virtually any other control via
ToolStripControlHost. Using a few lines of code, I hosted a
ProgressBar in the
ToolStrip to show the browse page navigation as you can see in the Fig. 4.
ToolStrip, StatusStrip has predefined controls also. Is has a
Panel and a
Now you doesn’t need to import a COM control do add web functionalities to your .Net application. With Whidbey class libraries you need just open the Toolbar and drag-and-drop the WebBrowser control that has a collection of methods, properties and events to enable you to implement all web functionalities in your .Net application. You will see that the snippet code for the WebBrowser is very simple.
Points of Interest
What I could see with these new controls is that because now you have a set of controls in one container the productivity is leveraged and the final look and feel is much better than with the older controls as well.
Microsoft has released the Visual Studio Beta 1. If you are a MSDN subscriber, you can download the package from MSDN site. Otherwise, you can download product of your choice from the Visual Studio 2005 Express line product in this link
I revised the project and fixed a bugs with the ProgressBar that fired an exception in some conditions. So now you can use the new Visual C# 2005 Express to run ZeBrowser. Enjoy!