Visual Basic 6 Black Book:The Visual Basic Development Environment
function GetCookie (name)
{
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen)
{
var j = i + alen;
if (document.cookie.substring(i, j) == arg) {
var end = document.cookie.indexOf (";", j);
if (end == -1)
end = document.cookie.length;
return unescape(document.cookie.substring(j, end));
}
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) break;
}
return null;
}
var m1='';
var gifstr=GetCookie("UsrType");
if((gifstr!=0 ) && (gifstr!=null)) { m2=gifstr; }
document.write(m1+m2+m3);
Keyword
Title
Author
ISBN
Publisher
Imprint
Brief
Full
Advanced Search
Search Tips
Please Select
-----------
Components
Content Mgt
Certification
Databases
Enterprise Mgt
Fun/Games
Groupware
Hardware
IBM Redbooks
Intranet Dev
Middleware
Multimedia
Networks
OS
Prod Apps
Programming
Security
UI
Web Services
Webmaster
Y2K
-----------
New Titles
-----------
Free Archive
To access the contents, click the chapter and section titles.
Visual Basic 6 Black Book
(Publisher: The Coriolis Group)
Author(s): Steven Holzner
ISBN: 1576102831
Publication Date: 08/01/98
function isIE4()
{
return( navigator.appName.indexOf("Microsoft") != -1 && (navigator.appVersion.charAt(0)=='4') );
}
function bookMarkit()
{
var url="http://www.itknowledge.com/PSUser/EWBookMarks.html?url="+window.location+"&isbn=0";
parent.location.href=url;
//var win = window.open(url,"myitk");
//if(!isIE4())
// win.focus();
}
Search this book:
Previous
Table of Contents
Next
Displaying Or Hiding IDE Windows
Youre 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.
Figure 2.34 Specifying visible IDE windows in the View menu.
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 Definition
Forms, 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.
Figure 2.35 Searching for text throughout a whole project.
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.
Figure 2.36 Finding a variables definition.
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.
TIP: Besides jumping to a variable or procedures definition in code, you can also jump to its previous use in codejust select the pop-up menus Last Position item.
Optimizing For Fast Code, Small Code, Or A Particular Processor
Your 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:
1. Select the Properties item in the Visual Basic Project menu.
2. The Project Properties box opens, as shown in Figure 2.37. Select the Compile tab in that box.
Figure 2.37 Optimizing a project for speed or code size.
3. Select the kind of code optimization you want in the
Properties box:
Optimize For Fast Code
Optimize For Small Code
No Optimization
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 Modules
Your 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.
Figure 2.38 Adding forms and modules with the Visual Basic Project menu.
The Visual Basic Project menu allows you to add these items to a project:
Form
MDI form
Module
Class module
User control
Property page
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:
1. Select the Components item in the Project menu, opening the Components box as shown in Figure 2.39.
Figure 2.39 Adding the Add-In Designer.
2. Select the Designers tab in the Components box.
3. Select the designer you want to add, such as the Add-In Designer, and close the Components box.
4. You can reach the new object designer to design the addition to your project with the Add ActiveX Designer item in the Project menu. That item opens a submenu showing the available designers, including the one weve just added, the Visual Basic Add-In Designer.
Previous
Table of Contents
Next
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.
Wyszukiwarka
Podobne podstrony:
2010 01 02, str 067 073072 073073 Wiatr i Niepamięć076 078The Modern Dispatch 078 Cyberpunk Genre Adventure Generatorv 04 073SHSpec 078 6111C09 Effective AuditingSHSpec 073 6110C31 Rudimentswięcej podobnych podstron