[ Pobierz całość w formacie PDF ]
.Those are the basic types of applications you can create.You can also create anEmpty project (for Windows applications, class libraries, and services) or an emptyWeb Application (for Web applications).Examining the IDEIf you are still on the New Project dialog, choose to create a Windows Application.Name it LearningVB and click the OK button.After a time, a new project will openup.Notice this adds a Form1.vb tab to the main window.In the main window, younow have an empty form.This is commonly referred to as the Form Designer.In fact,there are various types of designers that can get loaded into this work area.So far,you should feel pretty much at home.One difference that has occurred, perhaps without you noticing, is that the files cre-ated have already been saved on your machine.In VB, you could create a project, dosome quick coding, and then exit without saving, and nothing was stored on yourmachine.Now, however, the files are saved at creation, so each project you createdoes store something on the hard drive.Visual InterDev developers are used to this,but straight VB developers will see this as a change.If you look at the right side of the IDE, you ll see a window called the SolutionExplorer.This works like the Project Explorer in VB6, showing you the projects andfiles you have in the current solution (what VB6 called a group).The SolutionExplorer currently lists the solution name, the project name, and all the forms andmodules.Right now, there is just one form, named Form1.vb.In addition, the win-dow will have a file called AssemblyInfo.vb, which is part of the metadata that will 03 2203-x CH02 5/25/01 9:57 AM Page 2626 Chapter 2: Your Fi rst VB.NET Appl i cati onbe compiled into this assembly.You also see a new node, called References, in thelist.If you expand the References node, you will see all the references that arealready available to your project when you start.You can see the Solution Explorer inFigure 2.4.For now, don t worry too much about the references.A second tab, labeled Class View, exists at the bottom of the Server Explorer win-dow.If you click on the Class View tab, you will see the LearningVB project listed.If you expand the project node, you will see the namespaces for this project listed.Itso happens that there is just one namespace at the moment, and by default, it is thesame as the project name.Expand the LearningVB namespace and you will see thatjust Form1 is listed below it.Expand Form1 and you will see some of the form smethods, as well as a node for Bases and Interfaces.If you expand that node andthe Form node under it, you will see a long list of properties, methods, and eventsavailable to you in the form.You can see a small part of this list in Figure 2.5.Again,don t worry about these for now.Just understand that this is certainly different fromanything you saw in Visual Basic 6.Figure 2.4The Solution Explorer window. 03 2203-x CH02 5/25/01 9:57 AM Page 27Creati ng a New Proj ect 27Figure 2.5The new Class View window.If you want to know more about what one of those properties or methods can do foryou, it s easy to look it up in the Object Browser.For example, scroll down the Basesand Implemented Interfaces list until you find FocusInternal.Right-click on it andchoose Browse Definition.You will see that the Object Browser opens as a tab in themain work area, and that you are on the definition for the FocusInternal method.You can see that FocusInternal returns a Boolean.Figure 2.6 shows what thisshould look like in the IDE.Below the Server Explorer/Class View windows is something that will be quite famil-iar to you: the Properties window.If you close the Object Browser and go back to theForm1.vb [Design] tab, you should see the properties for Form1.You might actuallyhave to click on the form for it to get the focus.After the form has the focus, you willsee the properties for the form.Most of these properties will look very familiar toyou, although there are some new ones.What some of these new properties are, andwhat they can do for you, will be examined later in this chapter. 03 2203-x CH02 5/25/01 9:57 AM Page 2828 Chapter 2: Your Fi rst VB.NET Appl i cati onFigure 2.6The Object Browser is now a tab in the main work area.NOTEThe Properties window is sorted by category instead of alphabetically, by default.Therefore, it can be difficult to find certain properties.In the toolbar for theProperties window are buttons that let you switch between a categorized andalphabetical listing of the properties.In the same area as the Properties window is a tab labeled Dynamic Help.This is anew Visual Studio.NET feature that allows you to have constantly updating helpwhile you work [ Pobierz całość w formacie PDF ]

  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • czarkowski.pev.pl
  •