|
|
|
![]() | |
|
|
|
To access the contents, click the chapter and section titles.
Visual Basic 6 Black Book
Customizing Menus And ToolbarsVisual Basic might be nice, but its just not set up as youd like it. You might think, for example, that the Start menu itemto run programssurely should be in the Edit menu. Well, if youd like to place it there, its possible (just dont expect anyone else to be able to use Visual Basic after youve customized it that way...). Heres how you move items between menus or toolbars:
Besides moving menu items to new locations in menus and toolbars, you can also move whole menus. For example, to move the Edit menu in the menu bar, just open the Customize box and find the Built-in Menus item in the Categories box of the Commands tab. Next, drag the menu you want to movesuch as the Edit menufrom the Commands box to its new location in the menu bar. You can move menus to either the menu bar or other toolbars this way.
The toolbars in Visual Basic are dockable, of course, so that means you can move them around as youd likeeven above the menu bar. Just grasp the double upright bars at left in the toolbar (Visual Basic uses Explorer-style toolbars) and move the toolbar to its new location. Setting Forms Initial PositionsYouve completed the projecton schedule and under budget even. But youre not crazy about where Visual Basic displays the startup form on the screen when the program starts. You can set the forms Left and Top properties if you like, but theres an easier and more interactive way using the Form Layout window. The Form Layout window is part of the IDE, and its default position is at the lower right in the IDE. This window appears in Figure 2.29.
Setting a forms initial position couldnt be easierjust drag the form into the new location using the mouse. If you want to know the forms exact new position, watch the first set of numbers in the toolbarthose numbers record the location of the upper left of the form (in twips).
Enabling Or Disabling Quick Info, Auto List Members, Data Tips, And Syntax CheckingDepending on your personal tastes, Visual Basic has a great/terrible set of features/bugs that assist/hobble you while working on your code. These features are as follows:
The Quick Info feature lets you know what parameters a procedure takes as youre actually typing the procedures name, as in Figure 2.30. This is a useful feature that can save you time looking up parameter order or type.
The Auto List Members feature lists the members of an object as youre typing the objects name (actually when you type the dot [.] after the objects name, as in Figure 2.31). This is useful if you cant remember exactly what property you want to work with (for example, do I want the Text property, or was it the Caption property?).
Visual Basic Data Tips are tip tools that appear while youre debugging a program, and theyre a truly useful innovation. When Visual Basic is in the Debug state, you can let the mouse rest over a variable name in your code, and Visual Basic will display that variables current value in a Data Tip, as shown in Figure 2.32.
Syntax Checking speaks for itselfwhen you move the text insertion point away from a line of Visual Basic code while writing that code, Visual Basic will check the lines syntax and display an error box if there is an error. That can get annoying if youre the type of programmer who likes to move around in a file while writing code (What was the name of that variable again?). You can turn all of these features on and off following these steps:
|
|
Products | Contact Us | About Us | Privacy | Ad Info | Home
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc. All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. |