Datasheet

To show you that this simplicity extends well beyond the age-old Hello World program, I can show you
how to create a simple web browser. The intention is to create a form that has a button, a text input area,
and a fully functional web browser on it. When the user clicks the button, the web browser will attempt
to navigate to the URL entered in the text area.
Try It Out Your Very Own Web Browser
1.
Start a new Windows Application project in the same way you did in the previous Try It Out
exercise.
2. Once the blank form is generated, you need to add a Button control, along with a TextBox con-
trol, and a
WebBrowser. Because you want to be able to see what’s on the web page, resize the
form to 500 pixels wide by 460 pixels high. To do this, you can select the form in the design win-
dow and click and drag the bottom right corner to the desired size, or you can locate the
Size
values in the Properties window. You’ll learn more about properties in more detail in subse-
quent chapters, but for now overwrite the current setting with the value 500, 460.
3. Once the form size is set, click and drag the three controls from the Toolbox onto the form and
then resize themagain using either the click-and-drag method or setting the values directly in
the Properties windowso they are laid out as shown in Figure 1-7. You should also set the
Text property of the button control to the word Go.
You’ll notice that as you click and drag controls to move them about or to resize them, small
helper lines appear. These lines indicate ideal proximity to the edges of the form or to other con-
trols. In some cases, you’ll also see small blue alignment lines that make aligning controls with
each other easy.
Figure 1-7
13
Basic Installation
05_595733 ch01.qxd 12/1/05 1:34 PM Page 13