|
|
![]() | |
|
|
|
To access the contents, click the chapter and section titles.
Visual Basic 6 Black Book
Displaying Or Hiding IDE WindowsYoure feeling crampedis it your chair? Your office? No, this time, its your screen. With the proliferation of windows in the Visual Basic IDE, there seems to always be more and more of them clamoring for your attention. Want to clear some IDE windows out to make room for the important ones? Just close the windows by clicking their close buttons (the button marked x in the top right of the window). Whoopsnow you need the Form Layout window back. But how do you get it back? Or how would you get the toolbox back if it disappeared? Or the Properties window? The solution is easy: All you have to do is to select the window you want to show again in the View menu, and itll reappear. Open the View menu as shown in Figure 2.34, and click the name of the window you want to make visible againits that simple.
This is a simple task indeed, but its worth including here; more than one programmer has panicked after closing the toolbox by mistake and wondering if Visual Basic must be reinstalled to get it back! Searching An Entire Project For Specific Text Or A Variables DefinitionForms, modules, class modules, MDI formshow are you supposed to keep them all straight? These days, there are more files than ever in a Visual Basic project, and anything that can give you an overview can help. The Project Explorer is one such tool. This window gives you an overview of your entire project, organized into folders. However, there are times when thats not good enoughtimes when you need more details. One such occasion is when you want to find all the occurrences of specific text throughout an entire projectfor example, you might want to find all the places a particularly troublesome variable is used. To do that, you can now just use the Edit menus Find item. Selecting that item opens the Find box, as shown in Figure 2.35. Now you can search all the code in an entire project if the code window is openjust click the Current Project option button before searching, as shown in Figure 2.35.
Even if youre familiar with searching for text throughout an entire project, theres one more capability that you might not know aboutjumping to a variables or procedures definition just by clicking it. To jump to a variables or procedures definition, just right-click that variable or procedure any place its used in the code. Doing so opens a pop-up menu, as shown in Figure 2.36.
To jump to the variables or procedures definition, just select the Definition item in the pop-up menu. This is very useful when, for example, youve set up a new procedure somewhere but cant quite remember what parameters you pass to that procedure, and in what order.
Optimizing For Fast Code, Small Code, Or A Particular ProcessorYour project works the way you want it, but now the users are complaining about the size of the EXE file. Isnt there any way to make it less than 500MB? Well, that might be a bit of an exaggeration, but Visual Basic does let you optimize your project in several different ways, and one of them is to optimize the code for size. To optimize your program for code size or speed, follow these steps:
Besides optimizing for code size and speed, you can optimize the code for the Pentium Pro processor in the Project Properties box as welljust click the Favor Pentium Pro checkbox. The Pentium Pro is currently the only processor Visual Basic lets you optimize for, but it does have one automatic check: the FDIV check to check for bad Pentiums (see Checking For Pentium Errors earlier in this chapter). Adding And Removing Forms, Modules, And Class ModulesYour project is nearly finished. Now its time to add an About dialog box. So how do you add new forms to a project? You do that in one of a couple of ways: First, you can use the View menu, as shown in Figure 2.38.
The Visual Basic Project menu allows you to add these items to a project:
You can also add these items to a project by right-clicking any item in the Project Explorer window and selecting the Add item in the resulting pop-up menu. The Add submenu opens, and it holds the same items. Adding ActiveX Designers Besides ready-made objects like forms and modules, you can add ActiveX designers to the Visual Basic Project menu. These designers let you design new objects that are part of your project. For example, to add the Visual Basic Add-In Designer, you follow 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. |