Features of Visual Gui Interface: – Vb is a Graphical User Interface language. This means that a VB program will always show something on the screen that the user can interact with to get a job done. Modularization: – It is considered good programming practice to modularize our programs. Small modules where it is clearly indicated what comes into the module and what goes out makes a program easy to understand. Object Oriented: – Object Oriented Programming is a concept where the programmer thinks of the program in “object” that interact with each other. Visual Basic forces this good programming practice. Debugging: – Visual Basic offers two different options for code debugging Managed Code Runtime Debugger The Debugging Managed Code Individually debugs C and C++ applications and Visual Basic Windows applications. The Runtime Debugger helps to find and fix bugs in programss at runtime. Data Access Feature: – By using data access features, we can create databases, scalable sever-side components for most databases, including Microsoft SQL Server and other enterprise-level database. Macros IDE: – The Macros integrated development environment is similar in design and function to the Visual Studio IDE. The Macros IDE includes a code editor, tool windows, the properties windows and editors.
SetFocus Places the cursor in a specified text box. Check Boxes · Check boxes provide a way to make choices from a list of potential candidates. Some, all, or none of the choices in a group may be selected. Check Box Properties: Caption Identifying text next to box. Font Sets font type, size. Value Indicates if unchecked (0, vbUnchecked), checked (1, vbChecked), or grayed out (2, vbGrayed). Check Box Events: Click Triggered when a box is clicked. Value property is automatically changed by Visual Basic. Option Buttons · Option buttons provide the capability to make a mutually exclusive choice among a group of potential candidate choices. Hence, option buttons work as a group, only one of which can have a True (or selected) value. Option Button Properties: Caption Identifying text next to button. Font Sets font type, style, size.
Combo Boxes · The box is similar to the list box. The differences are a combo box includes a text box on top of a list box and only allows selection of one item. In some cases, the user can type in an alternate response. · Combo Box Properties: Combo box properties are nearly identical to those of the list box, with the deletion of the MultiSelect property and the addition of a Style property. Appearance Selects 3-D or flat appearance. List Array of items in list box portion. ListCount Number of items in list. ListIndex The number of the most recently selected item in list. If no item is selected, ListIndex = -1. Sorted True means items are sorted in 'Ascii' order, else items appear in order added. Style Selects the combo box form. Style = 0, Dropdown combo; user can change selection. = 1, Simple combo; user can change selection. = 2, Dropdown combo; user cannot change selection. Text Text of most recently selected item. Combo Box Events: Click Event triggered when item in list is clicked.
Menu Editor The Menu Editor allows us to define the menu structure, adding access keys and shortcut keys, if desired. We then add code to the Click events we need to respond to. The Menu Editor is selected from the Tools menu bar or by clicking the Menu Editor on the toolbar. This selection can only be made when the form needing the menu is active. Upon selecting the editor, and entering the example menu structure The Caption box is where you type the text that appears in the menu bar. Access keys are defined in the standard way using the ampersand (&). Separator bars (a horizontal line used to separate menu items) are defined by using a Caption of a single hyphen (-). When assigning captions and access keys, try to use conform to any established Windows standards. · The Name box is where you enter a control name for each menu item. This is analogous to the Name property of command buttons and is the name used to set properties and establish the Click event procedure for each menu item. Each menu item must have a name, even separator bars! The prefix mnu is used to name menu items. Sub-menu item names usually refer back to main menu headings. For example, if the menu item New is under the main heading File menu, use the name mnuFileNew. · The Index box is used for indexing any menu items defined as control arrays. · The Shortcut dropdown box is used to assign shortcut keystrokes to any item in a menu structure. The shortcut keystroke will appear to the right of the caption for the menu item. An exa mple of such a keystroke is using Ctrl+X to cut text.
write records of data to a file. In VB, Print is implemented as a method of the following objects: Form You can print lines of data directly to the background of a form. This is done in the examples in the section, although it is not typically done in regular VB applications. Statements that print to a form begin in any of the following ways: Form1.Print . . . Me.Print . . . Print . . . Picture Box You can print lines of data or graphics to a PictureBox control, with syntax beginning like the following: PictureBox1.Print . . . · Debug object You can print lines of data to the VB Immediate Window, using syntax beginning like the following: Debug.Print . . . Printer You can print lines of data to the Windows default printer, using syntax beginning like the following: