Presentation is loading. Please wait.

Presentation is loading. Please wait.

Tutorial 111 The Visual Studio.NET Environment The major differences between Visual Basic 6.0 and Visual Basic.NET are the latter’s support for true object-oriented.

Similar presentations


Presentation on theme: "Tutorial 111 The Visual Studio.NET Environment The major differences between Visual Basic 6.0 and Visual Basic.NET are the latter’s support for true object-oriented."— Presentation transcript:

1 Tutorial 111 The Visual Studio.NET Environment The major differences between Visual Basic 6.0 and Visual Basic.NET are the latter’s support for true object-oriented programming and Web applications programming Visual Basic.NET introduces Web forms that bring the same design principles and level of productivity to mobile Web applications

2 Tutorial 112 The Visual Studio.NET Environment

3 Tutorial 113 Identify the Components of Visual Studio.NET and the new IDE The Visual Studio.NET IDE has a new, customizable look that integrates Visual Basic and the other Microsoft programming languages This common IDE also provides better debugging throughout the project The real strength of the common IDE is in its support for Web applications

4 Tutorial 114 Identify the Components of Visual Studio.NET and the new IDE

5 Tutorial 115 Modify Your Profile in the Visual Studio.NET IDE The new Visual Studio.NET IDE allows you to customize various program settings such as keyboard scheme, window layout, and help filter This collection of customized preferences is called a profile

6 Tutorial 116 Modify Your Profile in the Visual Studio.NET IDE

7 Tutorial 117 Modify Your Profile in the Visual Studio.NET IDE Like Visual Basic 6.0, the new IDE provides a Toolbox where various programming elements are stored

8 Tutorial 118 Customizing the New Visual Studio.NET IDE You can customize many of the IDE’s menu features Customization of the IDE allows you, as a developer, to set the IDE to your particular needs, making you both more efficient and effective in your application development, since you will not need to reset the IDE each time you enter the environment

9 Tutorial 119 Customizing the New Visual Studio.NET IDE

10 Tutorial 1110 Customizing the New Visual Studio.NET IDE

11 Tutorial 1111 Using Solution Explorer New to the IDE are solutions, which are containers for specific project types at each of the logical application tiers The IDE shows these project types in the Solution Explorer, which displays a list of all the projects that are part of the current solution along with their corresponding files and directories A solution can include several projects, even if they are written in different programming languages

12 Tutorial 1112 Using Solution Explorer

13 Tutorial 1113 Working with Dynamic Help The Dynamic Help window allows you to access context-sensitive help with one click The Dynamic Help feature tracks the actions you have made while in the IDE

14 Tutorial 1114 Working with Dynamic Help

15 Tutorial 1115 Using the Task List The Task List feature was formerly available only to developers working in Visual InterDev and Visual J++ It allows you to mark code with comments related to tasks that need to be done

16 Tutorial 1116 Using the Task List

17 Tutorial 1117 The Command Window In the new Visual Studio.NET IDE Command Window, you can perform search and replace operations across the Visual Studio.NET environment using the find, navigate, and execute features—all in a single input line

18 Tutorial 1118 Starting Visual Basic.NET The first step of building any Visual Basic.NET application is to start Visual Basic

19 Tutorial 1119 Starting Visual Basic.NET

20 Tutorial 1120 Using Windows Forms Windows Forms replaces the Visual Basic Form that you used to create program interfaces in Visual Basic 6.0 Windows Forms provides improved features that make it easier for you to create interfaces for your Visual Basic programs Windows Forms provides a standard development platform across the different languages supported by Visual Studio.NET

21 Tutorial 1121 Viewing Code in Windows Forms At first glance, you will see that Visual Basic.NET Windows Forms looks similar to the Visual Basic 6.0 Form Unlike Visual Basic 6.0, the new form module contains all of the code to instantiate the form and the runtime instance of the controls created on the form

22 Tutorial 1122 Viewing Code in Windows Forms

23 Tutorial 1123 Differences Between Visual Basic.NET Windows Forms and Visual Basic 6.0 Forms Windows Forms is compatible with the forms package in Visual Basic 6.0 The key differences are as follows: There is no shape control in Windows Forms There is no line control in Windows Forms As you learned in Tutorial 6, Lesson B, in Visual Basic 6.0, there was one menu control, called Menu. Menu could be opened as a MainMenu or ContextMenu Visual Basic.NET Windows Forms does not support the Form.PrintForm method

24 Tutorial 1124 Setting Appearance Properties You will work in the Visual Basic.NET Design View and experiment with properties of controls

25 Tutorial 1125 Adding a Label Control to the Windows Forms Calendar Application The first control you will work with in Visual Basic.NET is the label control

26 Tutorial 1126 Adding a Label Control to the Windows Forms Calendar Application

27 Tutorial 1127 Adding Picture, Text, and Frame Controls In the Windows Forms application, the functionality of Visual Basic 6.0 controls still exists; however, the names, various properties, and methods have been changed

28 Tutorial 1128 Adding ActiveX Calendar, Date, and Time Controls The DateTimePicker and MonthCalendar are ActiveX intrinsic controls included in Visual Basic.NET—they are built right into the core Visual Basic.NET code You never have to add them to the Toolbox

29 Tutorial 1129 Adding a Button Control and Code You will use the Visual Basic.NET Button control to handle this task Now that you have added the button to the form, you must program it with the appropriate message using the procedures outlined at the top of page 828 of the textbook

30 Tutorial 1130 Visual Basic 6.0 and Visual Basic.NET: Differences in Coding Visual Basic.NET is now truly an object-oriented programming language with true object class inheritance You will programmatically add functionality to the Button control you just created In Visual Basic 6.0, the programmer did not see the code for many controls Visual Basic 6.0 automatically added to the program the references to the control instances created on the form

31 Tutorial 1131 Visual Basic 6.0 and Visual Basic.NET: Differences in Coding

32 Tutorial 1132 Completing the Code for the Button Now you will add the code that displays the textbook and the message that appears when the button is clicked To make the button on your Pets Online application functional, you will need to enter code in your calendar application as shown on page 829 of the textbook

33 Tutorial 1133 Variable Declarations in Visual Basic.NET In Visual Basic.NET, all variables in a single Dim statement must have the same type and that type need only be declared after the last variable is declared In Visual Basic.NET, however, the scope of a variable is restricted to the smallest area possible Variables are declared only when they are first used This allows variables to be limited to parts of procedures

34 Tutorial 1134 Passing Parameters in Visual Basic.NET In Visual Basic.NET, the parameters are passed ByVal by default, with the exception of references to classes, interfaces, and arrays, which are still passed ByRef by default To test the button perform the two procedures listed on pages 830 and 831 of the textbook

35 Tutorial 1135 Adding a Link Label to the Windows Forms Calendar Application Pets Online wants its customers to be able to click a link to its online catalog You can use the new Visual Basic.NET LinkLabel control to do this This control, like other new controls—such as Tray Icon and Print Preview—are new to Visual Basic.NET and provide additional common functionality for developers The LinkLabel control allows you to create and add Web-style links on your Windows Forms applications

36 Tutorial 1136 Adding a Link Label to the Windows Forms Calendar Application

37 Tutorial 1137 Adding a Menu and Menu Items With the new Visual Basic.NET Menu Designer control, you can quickly and easily add menus to Windows Forms application, modify them, and view them without having to run the application

38 Tutorial 1138 Adding a Menu and Menu Items You will need to also add the code for the Click event for the Exit option When the user clicks this option on the menu, the application should use the Close statement to Close the form

39 Tutorial 1139 Printing Windows Forms Application Code To print the code: Verify that you are in Code View From the IDE menu bar, select File, Page Setup. Select the Line numbers check box to number the code lines for reference Click OK From the menu bar, select File, Print and click OK

40 Tutorial 1140 Saving and Exiting a Windows Forms Application You should save all the components of this application before you exit Visual Basic.NET If you are distributing your application to a user, you will need to give the user a copy of the calendar.exe file and a copy of the Visual Basic runtime file (msvbvm6.0.dll), just as you do with Visual Basic 6.0


Download ppt "Tutorial 111 The Visual Studio.NET Environment The major differences between Visual Basic 6.0 and Visual Basic.NET are the latter’s support for true object-oriented."

Similar presentations


Ads by Google