1 / 23

Visual Studio

Visual Studio. Introduction. Visual Studio is Microsoft’s Integrated Development Environment (IDE) for creating, running and debugging apps (also called applications) written in various .NET programming languages. Multiple-project solutions are for large-scale apps.

tiah
Télécharger la présentation

Visual Studio

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Visual Studio

  2. Introduction • Visual Studio is Microsoft’s Integrated Development Environment (IDE) for creating, running and debugging apps (also called applications) written in various .NET programming languages. • Multiple-project solutions are for large-scale apps. • Most apps we create consist of a solution containing a single project.

  3. Overview of the Visual Studio IDE • A Windows Forms app executes within a Windows operating system (such as Windows 7, Windows 8, and Windows 10) and typically has a graphical user interface (GUI)—users interact with this visual part of the app. • Windows apps include Microsoft software products like Microsoft Word, Internet Explorer and Visual Studio; software products created by other vendors; and customized software that you and other app developers create.

  4. Visual Studio Environment • The Visual Studio environment is where you create and test your projects. In Visual Studio, it is called an • Integrated Development Environment (IDE) consisting of various tools including: • Form Designer • Editor for entering and modifying code • Compiler • Debugger • Object Browser • Help Facility

  5. Menu Bar and Toolbar • Commands for managing the IDE and for developing, maintaining and executing apps are contained in menus, which are located on the menu bar of the IDE • The set of menus displayed depends on what you’re currently doing in the IDE.

  6. Tool Box You can scroll to view more controls. To sort the tools in the toolbox: • Right-click the toolbox and select. • Sort Items Alphabeticallyfrom the context menu (shortcut menu).

  7. Properties Window • To display the Properties window, select VIEW > Properties Window. • The Properties window displays the properties for the currently selected Form, control or file in Design view. • Properties specify information about the Form or control, such as its size, color and position.

  8. Using Help Context-Sensitive Help Visual Studio provides context-sensitive help pertaining to the “current content” (that is, the items around the location of the mouse cursor). To use context-sensitive help, click an item, then press the F1 key. The help documentation is displayed in a web browser window. To return to the IDE, either close the browser window or select the IDE’s icon in your Windows task bar. You can view this help by selecting the Form, clicking its Text property in the Properties window and pressing the F1 key.

  9. Text Box • Allows for user input • Text property • What is displayed in text box • What user entered in text box • TextAlign property • Controls alignment of text in the text box

  10. Group Box • Used as a container for other controls such as radio buttons and check boxes • Improves readability of form by separating the controls into logical groups • Example Names for Group Boxes • ColorGroupBox • StyleGroupBox

  11. Check Box • Allows the user to select or deselect one or more items in any group • Checked property • Checked = True • Unchecked = False • Use the Text property for the text you want to appear next to the box. • Example names for Check Boxes • BoldCheckBox • ItalicCheckBox

  12. Radio Button User may select only one in any group. First create a group box and then create each radio button inside the group box. Checked property Selected = True Unselected = False Text property What is displayed next to the radio button Example Names for Radio Buttons RedRadioButton BlueRadioButton

  13. Picture Box Displays/contains an image Image property Complete path and filename of graphic; it’s a good idea to place the graphic into the folder with your project before it is assigned to a picture box. Can set extension to .bmp, .gif, .jpg, .jpeg, .png, .ico, .emf, .wmf PictureBox controls have several useful properties such as the SizeMode property. StretchImage causes picture to be resized to match the size of the control, or the Visible property, which can be set to False to make the picture disappear

  14. Naming Rules and Conventions • Have a set of standards and always follow them. • No spaces, punctuation marks, or reserved words • Use Pascal casing. • Examples • MessageLabel • ExitButton • DataEntryForm • PaymentAmountTextBox

  15. Recommended Naming Conventions for VB Objects

  16. Modes • Design Time — used when designing the user interface and writing code • Run Time — used when testing and running a project • Break Time — if/when receiving a run-time error or pause error

  17. Planning the Project • Design the user interface. • Set up the form. • Resize the form. • Place a label and a button control on the form using the toolbox. • Lock the Controls in place. • After the user interface is designed, the next step is to set the properties.

  18. Setting the Form Properties • The default startup object is Form1 • The name of the form should always be changed to adhere to naming rules • The properties window shows the files properties

  19. Setting Properties • Label 1 Name MessageLabel Text leave blank • Button 1 Name PushButton Text Push Me • Button 2 Name ExitButton Text Exit • Form Name HelloForm Text Hello World by your name

  20. Setting the Tab Order of Controls (1 of 2) • One control on a Form always has the focus. • Not all control types can receive the focus. • Text boxes, buttons — focus • Picture boxes and labels — no focus • TabStop property is applicable only for controls that are capable of receiving the focus. • Designates whether a control is allowed to receive the focus; set to True or False • TabIndex property determines the order the focus moves as the Tab key is pressed.

  21. Setting the Tab Order of Controls (2 of 2)

More Related