cancel
 

 

Job type :

Zip Code :

community forums

Featuring over 100 topics of interest to DoItYourselfers.

How to Build a Browser Desktop Application in MS Visual Studio 2005

AlertThis content requires Flash

To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.

Download the free Flash Player now!

Get Adobe Flash Player

Video Transcript

Users come to expect standard behavior from their Desktop Applications and Windows Forms 2.0 provides that consistency. You do not have to worry about adhering the standards as standardization is built into the controls. In this section, we are going to build another project from scratch. Just like before, first you will see the finish project and then we will built it together step by step. Let us go ahead and run the project that we are going to build.

Navigate to your project files directory, open up Part 1, Lesson 3, and inside you will see a folder called Browser Desktop 2. Go ahead and click that, click it again, and draw into your bin debug directories. You will see the Browser Desktop 2 executable. Go ahead and double click this. What you see is something like Internet Explorer come up. It loads the Microsoft web site. I can see at the top of my window that I have File, Edit and Tools Options. I also have Toolbars with different buttons on it. I can go ahead and click on the Alt key and even see shortcut keys enabled from my different menu options. I can also use the Alt key and move and reorder elements on my Toolbar. I also see an Address Bar. I can use this Address Bar to change my URL. It even remembers the list of Urls that I have used, how useful!

The list of Urls on your machine maybe different; let us choose the live site. Let us go ahead and click on this bouncing arrow and go ahead and navigate to the live.com site. I can see that the progress bar down below has indicated this page has finished loading. This is pretty much a browser base application and this is something you can build right within the Visual Studio 2005.

Now, why would we want to build an application like this?

Well, on useful consideration is that this is actually a Windows Forms Application. It is not a browser application. Why would I want a Windows Form Application to host the browser? Let us say you want to build a broker desktop. You are working for an investment bank and an analyst wants to be able to inter multiple caller ports via an existing browser application. But let us say you are the developer want to manage state between each of the caller ports, so that when an analyst makes a change to a caller port, you can make sure that you save those changes before the analyst close that call report. Managing state between multiple windows is difficult to do on a browser application. However, with the Windows Form Application, it is quite easy. So this is one reason why you would want to use Windows Forms as your container control.

Another reason to use a browser control inside of a Windows Form is so that you can leverage browser features. Let us say you want to take advantage of IE's ability to show an XML document as a collapsable expendable hierarchy. This functionality is built into the new web browser control in Visual Studio 2005. Now that we have a glimpse of what we are going to build, let us go ahead and start coding.

Close out your Browser Desktop and close the second window. Let us go ahead and launch Visual Studio 2005.

As before, we are going to go ahead and create a Windows based application. Select File, New Project. But this time, let us use the B. Select Visual Basic and then select Windows. Let us go ahead and give our application a name. We will go ahead and call it Browser Desktop. Then go ahead and store the application. Select the browse button, navigate to your Desktop, Project Files, Part 1, Lesson 3, and select Open. Now, select Okay.

Now, let us look at the properties of F form object. Select the form object and go to your properties window. Go ahead and give the form a name. Change the text property to Browser Desktop. Next, we will go ahead and adjust the size of our form. Scroll up and change the size to 800 x 600. Let us go ahead and close the output window so we have more real estate.
Users come to expect standard behavior from their Desktop Applications and Windows Forms 2.0 provides that consistency. You do not have to worry about adhering the standards as standardization is built into the controls. In this section, we are going to build another project from scratch. Just like before, first... click to read more


Decorating For Thanksgiving

sponsored articles of the day

diy centers

Research and explore a wealth of wisdom on these topics