Click Here!
home account info subscribe login search My ITKnowledge FAQ/help site map contact us


 
Brief Full
 Advanced
      Search
 Search Tips
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

Bookmark It

Search this book:
 
Table of Contents


Index

Special Characters

& (ampersand)
& operator, use of, 37
access characters, 168–171, 235
* (asterisk), 101
$(AppPath) macro, 1047
32-bit MAPI DLLs, installing, 718
+ operator, 37
| (pipe symbol), 356
2D, 3D area charts, 385–387
2D, 3D bar charts, 387
2D, 3D combination charts, 390–392
2D, 3D line charts, 384–385
2D, 3D step charts, 388–390
_ (underscore), 38

A

Abs function, 113
Access characters, 155, 168–171, 235, 447
Action property, 346, 720, 897
Activating OLE objects, 912–914
Active control, determining, 971–972
Active form, determining, 992–993
ActiveControl property, 608, 915, 971–972
ActiveForm property, 608, 992–993
ActiveX components, 650, 652. See also ActiveX controls; ActiveX documents; Code components.
ActiveX Control Interface Wizard, 669, 675, 680
ActiveX controls, 650–651, 652
adding to DHTML pages, 713–715
adding to projects, 66–67
adding to toolbox, 664
constituent controls, 651, 659–661
creating, 653–658
embedding in Web pages, 657
event handlers, 659
events
adding, 678–680
Initialize event, 672
Paint event, 657
ReadProperties event, 671–672
Terminate event, 672
WriteProperties event, 671–672
files created for, 651
graphics, 655, 657
methods
adding, 674–678
Initialize method, 655
RaiseEvent method, 679
properties
adding at design time, 666–670
Ambient property, 666
AutoRedraw property, 657
displaying, 47
Extender property, 666
Let and Get procedures, 667–668, 669
making properties persistent, 671–674
property pages, 680–681
PropertyBag objects, 671, 693–694
referenced in VBP files, 25
registering with Windows, 67, 656, 664
testing, 655–656, 661–664
ActiveX Data Objects. See ADO (ActiveX Data Objects).
ActiveX Designers, 77
ActiveX DLLs, 935, 945
methods, passing arguments to, 951–953
registering, 957
threading models, 936, 963
ActiveX Document Migration Wizard, 683
ActiveX documents, 651, 652. See also DHTML pages; Web pages.
constituent controls, 684–689, 689
converting Visual Basic projects to, 683
creating, 682–683
DLLs vs. EXE files, 652, 684
DOB files, 686, 690–691
events
ReadProperties event, 693–694
WriteProperties event, 693–694
files created for, 651
integrating Web browsers into, 691–692
opening from Internet, 691–692
properties, 693–694
testing, 683, 690–691
VBD files, 686, 690–691
ActiveX EXEs, 935, 945
creating, 943–945
methods, passing arguments to, 951–953
properties, setting, 947
registering, 958
threading models, 936, 963
ActiveX MAPI controls, 697
Add Field dialog box, Visual Data Manager, 832
Add Form dialog box, 58–59, 178
Add-In Manager, 66
Add-Ins menu, IDE, 43, 66
Add method
Buttons collection, 482–484
collections, 110
ListImages collection, 507
ListItems collection, 520–521
ListSubItems collection, 527–528
Nodes collection, 512, 513
Panels collection, 485
Tabs collection, 533
Add Procedure dialog box, 667, 674–680, 947–949, 950
AddItem method, 254–255, 265
AddNew method, 844, 867–868
AddressCaption property, 720
AddressEditFieldCount property, 720
AddressLabel property, 720
AddressModifiableproperty, 720
ADO (ActiveX Data Objects), 827–828, 854. See also ADO data control; DAO (Data Access Objects); RDO (Remote Data Objects).
adding records, 844, 888
adocode example project, 883–894
collections, 827
creating record sets, 885–887
data-bound controls, 840–841, 847–848, 887
data environment, 824
deleting records, 844–845, 892–893
navigating data, 845–847, 890–892
opening connections to databases, 884–885
opening databases, 839–840
refreshing data, 845, 888–889
Remote Data Service (RDS), 828
SQL commands, executing, 893–894
transactions, 854
updating data, 845, 889–890
ADO data-bound controls, 848–849
ADO data control, 828. See also ADO (ActiveX Data Objects).
methods
AddNew method, 844
Delete method, 844–845
MoveFirst method, 846
MoveLast method, 846–847
MoveNext method, 845–846
MovePrevious method, 846
Refresh method, 845
UpdateRecord method, 845
properties
ConnectionString property, 828, 840
DataSource property, 840
Provider property, 828, 840
Recordset property, 844, 845, 846
RecordSource property, 828, 840
Adocode example project, 883–894
Advanced Optimizations dialog box, 64, 65. See also Compiler options; Optimization.
Advapi32.dll, 774
Alarm clock example program, 417–419
Alias clause, DLL procedure declarations, 776
Align item, Format menu, 52
Align property, 470, 494
Aligning controls, 51–52, 53–54, 442, 453
Aligning coolbars, 494
Aligning picture boxes, 317
Aligning status bars, 485
Aligning text, 200–201, 216–217, 446
Alignment property, 488
Allocating memory, 805–806, 807
AllowAddNew property, 849
AllowCustomize property, 482
AllowDelete property, 849
AllowUpdate property, 849
Ambient properties, 666
Ambient property, 666
Animation
Animation control, 742–743
arrays of Picture objects, 623, 634–635
Move method, 132
multimedia MCI control, 769
picture boxes, 320–321
in status bar panels, 489
timer control, 419–421
Animation control, 742–743
ANSI character set, limiting fonts to, 360
Apartment-model threading, 936
API Viewer add-in tool, Visual Basic, 779
App object, 962
AppActivate function, 112
Appearance property, 439
AppIsRunning property, 908
Application deployment, 1044–1048
Application Wizard
adding status bars to forms, 484
adding toolbars to forms, 123–125
designing menus, 157
integrating Web browsers into projects, 691–692
online help system, 1063–1064
profiles, 23
projects, creating, 22–28
Applications (Windows applications). See Windows applications.
Arcs, drawing, 460, 597–599
Area charts, 385–387
Arguments, passing, 679, 776, 951–953, 953–954
Arithmetic operators, precedence of, 103
Arrange method, 141
Arranging MDI child windows, 140–141
Array function, 95, 96
Arrays. See also Control arrays.animation sequences, 623, 634–635
array bounds checking, 63–65
Array function, 95
dynamic arrays, 94–95
looping over elements, 108
lower bound, 94
Option Base statement, 94
passing to procedures, 967–968
standard arrays, 93–94
Arrows property, 295–296
As Form keywords, 992
As keyword, variable type, specifying, 11
Asc function, 90, 101
Atn function, 113
Attachment… properties, MAPIMessages control, 720
Auto List Members feature, IDE, 70, 72
AutoActivate property, 912
AutoPlay property, 743
AutoRedraw bitmap, 648
AutoRedraw property
ActiveX controls, 657
controls, 584
drawing graphics from Load event, 588
forms, 129, 584
layering graphics, 611–612
picture boxes, 328
printing graphics, 610
AutoSize property, 317, 445, 488, 619
AutoVerbMenu property, 912–913
Available disk space, determining, 813–814
AVI files, playing, 742–743, 759–761
Axis titles in charts, 382

B

B argument, Line method, 593
Back button, Web browsers, 704
Back command, multimedia MCI control, 748, 769
BackColor property, 230, 585, 617
Background color. See BackColor property.
Bands, coolbar, 467, 494–495
“Bang” menus, 175–176
Bar charts, 2D and 3D, 387
BAS files (module files), 22
Best coding practices, 36–38
Bevel property, 488
Binary data, 425, 732–733
Binary files, 543, 554, 561–563
Binary raster operation mode (ROP2), 788–789
BitBlt Windows API function, 190, 793–794
Bitmaps, 190–192, 793–794
Blackness pen setting, 604
Blurring images, 646–647
BOF property, 871–872
Bold property, 590
Bolding text in RTF boxes, 209–211
Bookmarks, 78–79
Boolean variable type, 89
Border property, 903
BorderColor property, 585
Borders. See BorderStyle property; BorderWidth property.
BorderStyle property
flex grid control, 400
forms, 123
image controls, 618
line control, 456
picture boxes, 619
shape control, 452
BorderWidth property, 452, 456
Bound controls. See Data-bound controls.
BoundColumn property, 849
Bounds (array bounds)
bounds checking, 63–65
lower bound, 94
Boxes, drawing, 593–594
Break state, entering, 116
Breakpoints, 1031, 1036
Browser forms, customizing, 692. See also Web browsers.
BuddyControl property, 307
Bulleted text, RTF boxes, 214–215
Button groups, toolbars, 478
ButtonClick event, toolbars, 471–472
Buttons. See Checkboxes; Command buttons; Option buttons; Toolbars.
Buttons collection, toolbars, 482–484
ByRef keyword, 97, 98, 776, 951–953
Byte variable type, 89
ByVal keyword, 97, 98, 776, 951–953

C

C/C++ code
C/C++ data types, 776–778
linking programs to, 816–818
CAB files, 1045–1046
Calculator (ActiveX control example), 660–661
Call keyword, 775
Cancel button, Common Dialog controls, 347–348, 1028–1029
Cancel property, 244–245
CancelError property, 347–348, 1028–1029
CanStep property, 769
Caption property
buttons, 229, 235
data control (DAO), 834
forms, 121
frame control, 439
label control, 443
menus, 166
tab strip tabs, 533
Capturing images from screen, 794–799
Case statement. See Select Case statement.
Casting. See Converting data between variable types.
CBool function, 90
CByte function, 90
CCur function, 90
CD (FTP command), 730
CDate function, 90
CDbl function, 90
CDec function, 90
CDs (music), playing, 753–755
CDUP (FTP command), 730
CellFont… properties, flex grid control, 401
Cells. See Flex grid control.
Change event
combo boxes, 253, 267
DateTimePicker control, 430
directory list box control, 568
drive list box control, 567–568
list boxes, 253
scroll bars, 289–290
slider controls, 301
text boxes, 145, 207
updown controls, 308–309
Characters
restricting input characters, 206–207
Windows or ANSI character sets, limiting fonts to, 360
Chart control, 372–373, 375
adding data to, 376–379
adding to forms, 375
area charts, 385–387
bar charts, 387
colors, setting, 382
combination charts, 390–392
data series, 379–381
line charts, 381, 384–385
pie charts, 382–383
properties
ChartData property, 376–377
ChartType property, 375
Column property, 377–378
ColumnCount property, 377–378
Data property, 377–378
DataGrid property, 379
Row property, 377–378
RowCount property, 377–378
RowLabel property, 378
SetData methods, 379
step charts, 381, 388–390
titles, 382
ChartData property, 376–377
ChDir command, 816
ChDir statement, 572
ChDrive command, 816
Check buttons in toolbars, 477
Checkboxes, 227
adding and removing at runtime, 242
background color, 229–230
binding to data controls, 847
button releases, 244
caption, 229
combining with option buttons, 249–250
in control arrays, 233–234, 242
disabling, 236–237
displaying images in, 237, 239–240, 241, 616
events
Click event, 232–233
GotFocus event, 235
Key… events, 244
LostFocus event, 235
Mouse… events, 244
focus, 234, 236
graphical checkboxes, 248
keyboard access, 235
methods
Move method, 239
SetFocus method, 234
moving, 239
passing to procedures, 243
properties
BackColor property, 230
Caption property, 229, 235
Default property, 234, 236
DisabledPicture property, 237
DownPicture property, 241, 248
Enabled property, 237
Font property, 231–232
ForeColor property, 231
Height property, 239
Index property, 233–234
Left property, 239
Name property, 233–234
Picture property, 239–240, 248
Style property, 230, 237, 239–240, 241, 616
TabIndex property, 236
TabStop property, 236
ToolTipText property, 238
Top property, 239
Value property, 245–246
Visible property, 237–238
Width property, 239
resizing, 239
responding to button clicks, 232–233
showing and hiding, 237–238
state of checkbox, 245–246
tab order, 236
text attributes, 230–232
tool tips, 238
Checked property, 179
Checkmarks, 178–179, 264
Child property, 495–496
Choose function, 106
Chr function, 90, 101
CInt function, 90
Circle method
drawing arcs, 460, 597–599
drawing ellipses, 460, 596–597
forms and picture boxes, 324, 459, 594–595
printing graphics, 610–611
Circles, drawing, 324–325, 450, 459, 594–595
Class modules, 128, 934, 946. See also Classes, code components; Modules.
Class property, 904
Classes, code components, 934–935
adding to components, 944
creating objects, 940–942
Initialize event, 958
Instancing property, 936–937, 959–960
Terminate event, 958–959
Clear method, 264, 272
Clearing combo box items, 272
Clearing drawing area, 585
Clearing images, 621
Clearing list box items, 264–265
Clearing slider control selections, 306
ClearSel method, 306
Click event
buttons, 232–233
combo boxes, 253, 267–268
coolbar controls, 496–497
label control, 446
list boxes, 253, 256–257
multiselect list boxes, 261
picture boxes, 318
tab strips, 536
Web browser navigation, 701
Client area, 119
ClientToScreen Windows API function, 790, 800–802
Clip property, 626
Clipboard, 204–205, 332–333, 609, 610, 927
Clipboard object
methods
GetData method, 332
GetText method, 205
SetData method, 332
SetText method, 205
password controls, security of, 206
ClipControls property, 611–612
ClipHeight, ClipWidth properties, 626
ClipX, ClipY properties, 626
CLng function, 90
Clock example program, 415–416
Close command, multimedia MCI control, 748, 753
Close method, 578–579, 898, 908
Close statement, 564
Cls method, 330, 585, 621, 648
Code components, 651, 652, 934
classes, 934–935, 944, 958–959
creating, 942–945
dialog box libraries, 962
forms, showing, 961
global objects, 935, 959–960
in-process servers (ActiveX DLLs), 935, 936, 945, 951–953, 957, 963
methods, 942, 950, 951–953
objects, 934–935, 940–942, 960–961
out-of-process servers (ActiveX EXEs), 935, 936, 943–945, 947, 951–953, 958, 963
properties, 942, 946, 947–949
references to, adding, 938
SingleUse code components, 936–937
testing, 954–956
threading models, 936, 963
type libraries, 940, 941
using in projects, 938–940
Code windows, 6, 49
Col property, 393
Collapse event, 517
Collection ADO object, 827
Collections, 110. See also names of specific collections.
looping over elements in, 108
methods
Add method, 110
Item method, 110
Remove method, 110
Color constants, Visual Basic, 586–587
Color dialog box, 348–350
Color property, 358
Colors
Color dialog box, 348–350
color-related properties, 585
converting images to grayscale, 637–640
custom colors, allowing definition of, 350
drawing pen, 604–606
fill color, 453, 585, 601–602
four-byte integer color specifications, 588
IDE, customizing, 50–51
of points, retrieving, 604
propagating color values among pixels, 645
QBColor function, 586
RGB function, 586
system color constants, 587–588
Visual Basic color constants, 586–587
ColPosition property, 402
Cols property, 393
Column property, 377–378
ColumnClick event, 529
ColumnCount property, 377–378
Columns
flex grid control, 402–403
list views, 525–528
Columns property, 263, 629
Combination charts, 2D and 3D, 390–392
Combo boxes, 252–253
adding items, 266
adding to toolbars, 479–481
binding to data controls, 847
clearing items, 272
events
Change event, 253, 267
Click event, 253, 267–268
DblClick event, 253
DblClick events, 268
image combo boxes, 277–279
index of new items, 276–277
ItemData array, 275–276
locking, 272–273
methods
AddItem method, 265
Clear method, 272
RemoveItem method, 269
number of items, 273–274
numeric data, connecting to list items, 275–276
properties
Enabled property, 273
List property, 265
ListCount property, 273–274
ListIndex property, 267–268, 270
Locked property, 272
NewIndex property, 276–277
Sorted property, 271
Style property, 265, 273
Text property, 265, 267, 270–271
TopIndex property, 274–275
Visible property, 273
removing items, 269
restricting user input, 271, 272–273
selected items, 267–268, 270–271, 275
sorting, 271–272
topmost item, 274–275
types of, 265
Web browser navigation, 700–701
Comdlg32.dll, 774
ComEvent… errors, 426–427
Command ADO object, 827
Command buttons, 227
adding and removing at runtime, 242
background color, 229–230
button releases, 244
in control arrays, 233–234, 242
disabling, 236–237
displaying images, 237, 239–240, 241, 616
events
Click event, 232–233
GotFocus event, 235
Key… events, 244
LostFocus event, 235
Mouse… events, 244
focus, 234, 236
keyboard access, 235
methods
Move method, 239
SetFocus method, 234
moving, 239
passing to procedures, 243
properties
BackColor property, 230
Cancel property, 244–245
Caption property, 229, 235
Default property, 234, 236
DisabledPicture property, 237
DownPicture property, 241
Enabled property, 237
Font property, 231–232
ForeColor property, 231
Height property, 239
Index property, 233–234
Left property, 239
Name property, 233–234
Picture property, 239–240
Style property, 230, 237, 239–240, 241, 616
TabIndex property, 236
TabStop property, 236
ToolTipText property, 238
Top property, 239
Visible property, 237–238
Width property, 239
resizing, 239
responding to button clicks, 232–233
setting caption, 229
showing and hiding, 237–238
tab order, 236
text attributes, 230–232
tool tips, 238
using as Cancel buttons, 244–245
Command property, 741
Command strings, sending to modem, 423–424
Commands. See also Menu items.
FTP commands, 730, 735
multimedia MCI control commands, 748–749
OLE primary verbs, executing, 914
SQL commands, executing, 874–875, 883, 893–894
in text boxes and RTF boxes, 198–199
Commenting conventions, 33–34
CommEvent property, 409, 422, 424, 426–427
Common Controls, Windows. See Windows Common Controls.
Common Dialog controls, 342–343
adding to forms, 345
Cancel button, trapping button clicks, 347–348, 1028–1029
Color dialog box, 348–350
displaying dialog boxes, 345–346
displaying Windows Help, 368–370
File Open dialog box, 350–357, 544–545
File Save As dialog box, 350–357
Font dialog box, 358–362
methods
ShowColor method, 348–350
ShowFont method, 358
ShowHelp method, 368
ShowOpen method, 350–351
ShowSave method, 350–351
Print dialog box, 363–368
properties
Action property, 346
CancelError property, 347–348
Copies property, 364
DefaultExt property, 355
FileName property, 350–351, 354
FileTitle property, 351, 354
Filter property, 356–357
Flags property, 350, 352–353, 358, 360–361, 365–366
FromPage property, 364
hDC property, 364
HelpCommand property, 368
HelpFile property, 368
InitDir property, 355–356
MaxFileSize property, 354
Min, Max properties, 361–362, 366
Orientation property, 367–368
PrinterDefault property, 363
ToPage property, 364
title bar text, 346–347
CommPort property, 408, 423
Communications control, 407–408
adding to forms, 421
buffers, 422
handshaking, 425
modem command strings, sending, 423–424
OnComm event, 409, 422, 424, 426–427
properties
CommEvent property, 409, 422, 424, 426–427
CommPort property, 408, 423
EOFEnable property, 409, 422
Handshaking property, 425
InBufferCount property, 409, 424
InBufferSize property, 408, 422
Input property, 409, 422, 423, 424
InputLen property, 409, 422, 424
OutBufferCount property, 409, 425
OutBufferSize property, 408, 422
Output property, 409, 423–424, 425
PortOpen property, 408, 423, 427
RThreshold property, 408, 422
Settings property, 408, 423
SThreshold property, 408, 422
reading data, 409, 424
sending data, 409, 425
serial port, 408, 423, 427
Comparison operators, precedence of, 103
Compiler options
array bounds checking, 64
fast code, optimizing for, 75
listed in VBP files, 15
Pentium FDIV error check, 65
Pentium Pro processor, optimizing for, 76
small code, optimizing for, 75
Compiling Help files, 1060
Components, 58, 176–178. See also ActiveX controls; Code components.
Components dialog box, 67, 77, 664
Compose buffer, MAPIMessages control, 719
Compose method, 719, 721
Conditional statements. See also Choose function; Switch function.
If…Else statement, 104
nesting, 37
Select Case statement, 105
Connection object, ADO, 827, 884–885
Connection object, RDO, 854, 877–879, 883
ConnectionEvents, ADO, 828
Connections, serial. See Communications control.
ConnectionString property, 828, 840
Const statement, 85
Constants, 33, 36–37, 85–86, 778–779
Constituent controls, 651, 659–661, 684–689
Container controls, 322, 439–443
Containers, 611–612
Control arrays
buttons, 233–234, 242
controls, loading at runtime, 973–975
multiple OLE objects, 916–924
passing to procedures, 968, 970–971
Ubound property, 973
Control boxes, 122
Control buttons, 146
Control type, 970
Control variable type, 970
ControlBox property, 122
Controls. See also Data-bound controls; Keyboard interface.
active control, determining, 971–972
adding code to, 49
adding using toolbox, 48
aligning, 51–52, 53–54, 453
basing ActiveX controls on, 657–658
binding to ADO record sets, 887
clearing drawing area, 585
creating and loading at runtime, 973–975
determining type of, 972–973
device contexts, 780
drag and drop operations, 976–983
events
DragDrop event, 981–982
DragOver event, 982–983
Paint event, 584
grouping, 322, 442–443
lightweight (windowless) controls, 990–991
methods
Cls method, 585
Move method, 131–132
ZOrder method, 976
moving, 131
naming conventions (prefixes), 29–32
passing to procedures, 970
properties
ActiveControl property, 971–972
AutoRedraw property, 584, 610
BackColor property, 585
BorderColor property, 585
DataSource property, 887
DragMode property, 976
FillColor property, 585
ForeColor property, 585
hDC property, 780
managing using Properties window, 46–47
OLEDropMode property, 984
Parent property, 136
TabIndex property, 130, 975
TabStop property, 19, 130
Visible property, 132
redrawing graphics, 584
showing and hiding, 132
sizing, 51–52, 131
tab order, 129–130, 236, 975
Z-order position, 976
Controls collection, 993–994
Conventions. See Programming conventions, Microsoft.
Converting data between variable types, 90, 102
Coolbars, 466–467, 493–497
Coordinate systems, 133, 583, 606–607, 790
Copies property, 364
Copy method, 573, 719, 898
Copy Pen pen setting, 605
Copying images, 609, 635–636
Copying OLE objects, 927
Copyright information, adding to projects, 59
Core Windows DLLs, 774
Cos function, 113
Cosecant function, 114
Cotangent function, 114
CPP files, in DLLs, 816
Create New Data Source dialog box, 836
CreateBrush Windows API function, 788
CreateCompatibleBitmap Windows API function, 190
CreateCompatibleDC Windows API function, 190
CreateDatabase method, 857–858
CreateDC function, 780–781
CreateEmbed method, 898
CreateField method, 861–863
CreateIndex method, 861–863
CreateLink method, 898
CreateObject function, 940–941
CreatePen Windows API function, 786
CSng function, 90
CStr function, 90
CTL files (ActiveX control class files), 651
Ctrl key, 112, 172–173
CurDir command, 816
Currency variable type, 89, 116
Current directory, 353
Current form, referencing, 128
Current time, displaying, 415
CurrentX, CurrentY properties, 588
Custom colors, 350
Customize dialog box, IDE, 68
Customize Toolbar dialog box, Application Wizard, 469
CVar function, 90
CVErr function, 90, 1026–1027

D

DAO (Data Access Objects), 824–825, 853–854. See also ADO (ActiveX Data Objects); Data control, DAO; RDO (Remote Data Objects).
adding records, 844, 867–868
creating databases, 857–859
creating record sets, 863–865
DAO Object Library, 857
daocode example project, 856–875
data-bound controls, 835, 847–848
deleting records, 844–845, 872
editing records, 868
indexes on tables, creating, 861–863
navigating data, 845–847, 869–872
OpenDatabase method, 865–867
opening databases, 865–867
refreshing data, 845
searching record sets, 873
sorting records, 872
SQL statements, executing, 874–875
tables, 859, 860–861
updating data, 845, 868–869
workspace, 824
DAO Object Library, 857
Daocode example project, 856–875
Darkening images, 641
Dashed lines, drawing using line control, 456
Data. See also Databases.
adding to charts, 376–379
dragging and dropping between applications, 983–990
entering in databases, 833
reading from memory, 808, 809
receiving and sending, 424, 425
sensitive data, protecting, 37
storing in memory, 806, 808
Data Access Objects. See DAO (Data Access Objects).
Data-bound controls, 828–829
with ADO data control, 840–841, 848–849
with data control (DAO), 826, 835
list of, 847–848
with remote data control, 826, 838–839
Data control, DAO, 825–826. See also ADO data control; Remote data control.
adding to programs, 834
connecting to bound controls, 835
methods
AddNew method, 844
Delete method, 844–845
MoveFirst method, 846
MoveLast method, 846–847
MoveNext method, 845–846
MovePrevious method, 846
Refresh method, 845
UpdateRecord method, 845
properties
Caption property, 834
Database property, 826
DatabaseName property, 835
Recordset property, 826, 844, 845, 846
RecordSource property, 826, 835
Data conversion, 90, 102
Data forms, 841–843
Data property, 377–378
Data series, 379–381
Data Tips, 70, 72
Data types. See Variable types.
Database access, 830, 836–837. See also ADO (ActiveX Data Objects); DAO (Data Access Objects); Data-bound controls; RDO (Remote Data Objects).
Database object, DAO, 825, 853, 857–859, 863–865, 874–875
Database property, 826
DatabaseName property, 835
Databases. See also ADO (ActiveX Data Objects); DAO (Data Access Objects); RDO (Remote Data Objects).
adding records, 844, 867–868, 888
adocode example project, 883–894
components of, 823
connecting to flex grid controls, 403–404
creating, 830–833, 857–859
daocode example project, 856–875
deleting records, 844–845, 872, 892–893
moving between records, 845–847
navigating, 845–847, 869–872, 879–883, 890–892
opening, 835, 838, 839–840, 865–867
opening connections to, 876–877, 883–885
rdocode example project, 875–884
refreshing data, 845
relational databases, 776
updating, 845, 868–869, 889–890
DataCombo control, properties
BoundColumn property, 849
data properties, 849
DataField property, 849
DataSource property, 849
ListField property, 849
RowSource property, 849
DataField property, 835, 838–839, 840–841, 849
DataGrid control, 849
DataGrid property, 379
DataList control, 849
DataObject object, 984, 987
DataSource property
ADO data control, 840
controls, 887
DataCombo control, 849
DataGrid control, 849
DataList control, 849
flex grid control, 393, 404
remote data control, 838
text boxes, 835, 838–839, 840–841
DataSourceName property, 838
Date… methods, 574
Date function, 115
Date$ function, 413
Date values, 114–115, 413–415
Date variable type, 89
DateAdd function, 115
DateClick event, MonthView control, 428–429
DateDiff function, 115
DatePart function, 115
DateSerial function, 90, 115
DateTimePicker control, 410, 429–430
DateValue function, 90, 115
Day function, 90
DBCombo boxes, binding to data controls, 847
DBEngine DAO object, 825
DblClick event
combo boxes, 253, 268
label control, 446
list boxes, 253, 256–257
multiselect list boxes, 261
option buttons, 233
DBList boxes, binding to data controls, 847
DDB function, 116
Deactivating OLE objects, 916
Deallocating memory, 809, 810
Debug menu, IDE, 43
Debug toolbar, IDE, 61, 62
Debugging, 1007, 1029–1030
breakpoints, 1031, 1036
examining expressions and variables, 1033–1036
executing code to cursor, 1036
Immediate window, 1035–1036
Quick Watch window, 1033
single-stepping, 1032
skipping statements, 1036
using message boxes, 1030
Watch window, 1034
Decimal variable type, 89
Declaring arrays, 93–95
Declaring constants, 85–86
Declaring DLL procedures, 775–776
Declaring DLLs, 818
Declaring functions, 97–98
Declaring methods in code components, 950
Declaring properties in class modules, 946
Declaring subroutines, 96–97
Declaring variables, 11, 86–87
implicit declaration, 87
Option Explicit statement, 38, 88
Option Private Module statement, 91
variable scope, 90–91
variable types, 88–89
Declaring Windows API functions, 775–776
DEF files, in DLLs, 818
Default property, 234, 236
Default values, optional arguments, 954
DefaultExt property, 355
Defensive programming, 37
DELETE (FTP command), 730
Delete method
data controls, 844–845
FileObject, 574
MAPIMessages control, 719, 720
OLE control, 926
OLE objects, 898
Recordset objects, 872, 892–893
DeleteDC function, 782
DeleteFile method, 574
DeleteSetting Windows API function, 999
Deleting OLE objects, 926
Deployment package, 1044–1048
Description property, 1021–1022
Design standards, 155–156, 163–165, 172–173
Design time grid, 53–54, 453
Design time properties, 46
“Designed for Microsoft Windows” logo, 1041–1042
Device contexts
controls, 780
copying bitmaps between, 793–794
deleting, 782
drawing in, 782–788
for entire screen, 781–782
printers, 365
ROP2 (binary raster operation) mode, 788–789
windows, 780
Devices. See Media Control Interface (MCI) devices.
DeviceType property, 744–745
DHTML controls, 710
DHTML (Dynamic HTML), 696, 710, 715. See also DHTML Page Designer; DHTML pages.
DHTML Page Designer
opening, 706
Table Operation drop-down box, 715–716
text, entering, 709–710
toolbar, inserting HTML tags, 710
toolbox, 710–711, 712–713, 716–717
DHTML pages
ActiveX controls, 713–715
HTML controls, 712–713
HTML tags, 710
hyperlinks, 716–717
images, 710–711
tables, 715–716
testing, 717
text, 709–710
Dialog boxes
Cancel buttons, 244–245
creating, 146–147
designing, 122
displaying icons in taskbar, 995
libraries of, 962
modal display of, 147, 962, 996–997
Dim statement, 11, 86, 93–94, 138
DIR (FTP command), 730
Directories
changing, 572, 816
creating and deleting, 572
current directory, 353, 816
default directory, 816
downloading from Web pages, 731, 732
Windows installation directory, 814–815
Directory list box control, 568, 569–571
DisabledPicture property, 237
Disabling buttons, 236–237
Disabling forms at runtime, 151
Disabling menu items, 180–181
Disk space available, determining, 813–814
Display screen. See Screen; Screen object.
DisplayType property, 903–904
Distances, changing measurement scale, 17
<DIV> DHTML tag, 710
DLL files, 1043
DLL procedures, 775–776
DLLs (Dynamic Link Libraries)
ActiveX components, 652
ActiveX documents, 684
C++ DLLs, linking to, 816–818
code components (ActiveX DLLs), 935, 936, 945, 951–953, 957, 963
components of, 816–818
core Windows DLLs, 774
declaring, 818
DHTML pages, 706
error handling, 1023
vs. EXE files, 652, 684
Do loop, 107
DOB files (ActiveX document files), 651, 686
Dockable toolbars, 44
Document views, 144
DocumentProperties Windows API function, 780
Documents, 141, 144–145. See also ActiveX documents; MDI child forms; MDI forms.
Done event, 741, 763–764, 768
Dotted lines, drawing, 456
Double-clicking. See DblClick event.
Double variable type, 89
DoVerb method, 898, 913–914
Down picture, adding to buttons, 241
DownClick event, 308–309
DownloadComplete event, 701
Downloading files, 728–736
DownLoadMail property, 721, 725
DownPicture property, 241, 248
Drag and drop operations
columns in flex grid controls, 402–403
controls, 976–983
frames, 440–442
OLE objects, 983–990
Drag method, 440–441, 924–925
DragDrop event, 925, 977, 978–982
DragMode property, 976
DragOver event, 982–983
Drawing area, clearing, 585
Drawing boxes, 593–594
Drawing circles, 324–325, 450, 459, 594–595
Drawing freehand lines, 599–600
Drawing images, 622–623
Drawing lines, 325–326, 455–458, 591, 782–783
Drawing mode, setting, 604–606, 788–789
Drawing ovals, 450
Drawing pen, setting, 604–606, 786–788
Drawing points, 326, 604
Drawing position, setting, 782–783
Drawing rectangles, 449
Drawing rounded rectangles, 451
Drawing rounded squares, 451
Drawing scales, setting, 606–607
Drawing squares, 449
Drawing style, setting, 602–603
Drawing width, setting, 602–603
DrawMode property, 604–606
DrawStyle property, 602–603
DrawWidth property, 602–603
Drive list box control, 567–568, 569–571
Drive property, 567–568
Drop-down combo boxes, 265
Drop-down list combo boxes, 265
Dynamic arrays, 94–95
Dynamic HTML. See DHTML (Dynamic HTML).
Dynamic HTML Application item, New Project dialog box, 706
Dynamic Link Libraries. See DLLs (Dynamic Link Libraries).

E

Edit menu, 43, 78–79, 164–165
Edit method, 868
Edit toolbar, 61, 62
Editing images, 623
Editing OLE objects, 896, 912
Eject command, multimedia MCI control, 748, 755
Ejecting CDs, 755
Elapsed time, displaying, 417, 752
Ellipse Windows API function, 784
Ellipses, drawing, 460, 596–597, 784
Ellipsis ( …) in names of menu items, 155
ElseIf statement, 104
Email functionality. See also MAPIMessages control; MAPISession control.
composing messages, 721–722
MAPI controls, adding to projects, 718
MAPI session, initiating, 721
reading messages, 725–726
sending messages, 722–723
Visual Basic support for, 697
Embedded OLE objects, 897–899, 902, 905–907, 908–911, 929–930
Embedding ActiveX controls in Web pages, 657
Embossing images, 642–644
Enabled property
buttons, 237
combo boxes, 273
forms, 151
menu items, 181
scroll bars, 292
text boxes, 202
timer control, 412
Encapsulation, 37
End Function keywords, 99
End statement, 116
End Sub keywords, 97
EndDoc method, 611
Ending programs, 116, 136
Engraving images, 644–645
Enlarging OLE objects, 928
Enterprise Edition, Visual Basic, 2
EOF function, 556
EOF property, 870–871
EOFEnable property, 409, 422
Erase statement, 96
Erasing images, 621
Err object
Description property, 1021–1022
LastDLLError property, 1023
Number property, 1020–1021
Raise method, 1023–1024
Source property, 1022
Error ADO object, 827
Error function, 1021
Error handlers
disabling error trapping, 1015–1016
disregarding errors, 1015
nested error handling, 1024–1025
resuming execution, 1016–1020
using labels, 1012–1013
using line numbers, 1014
writing, 1009–1012
Error objects, creating, 1026–1027
Error property, 764–768
Error strings, multimedia MCI control, 765–767
ErrorMessages property, 764–768
Errors
comEvent… errors, 426–427
determining which error occurred, 1020–1021
in DLLs, 1023
error description, 1021–1022
list of trappable errors, 1003–1007
Pentium FDIV error, 65
source of error, 1022
trapping Cancel button in Common Dialogs, 347–348, 1028–1029
user-defined errors, 1023–1024
Errors collection, ADO, 827
Event handlers, 6, 659, 713
Events, 678–680. See also names of specific events.
Events ADO objects, 827
Exclamation point (!) in menu item names, 156, 176
Exclusive OR pen. See Xor Pen pen setting.
EXE files
ActiveX components, 652
ActiveX documents, 684
code components (ActiveX EXEs), 935, 945
creating, 943–945
methods, passing arguments to, 951–953
properties, setting, 947
registering, 958
threading models, 936, 963
creating, 44, 1043
vs. DLLs, 652, 684
icon, specifying, 61
name, setting, 61
Execute method, 697, 698, 727, 729–730, 735
Exit Function keywords, 98
Exit item, File menu, 164
Exit Sub keywords, 97
Exp function, 113
Expand event, tree views, 517
Expanded property, 518
Expressions
date and time format expressions, 115
examining values of (debugging), 1033–1036
operator precedence, 102–104
values of constants, 85
Extender objects, 666
Extender property, 666

F

F argument, Line method, 602
Fast code, optimizing for, 75
FDIV error, Pentium, 65
Fetch method, 719, 725
FetchMsgType property, 719
FetchSorted property, 719, 720
FetchUnreadOnly property, 719
FetchVerbs method, OLE objects, 898
Field ADO object, 827
Field DAO object, 825
Fields, database, 823, 831–832, 860–861
Fields collection, ADO, 827
Figures. See Graphics.
File list box control, 569
File menu, 43, 44, 164
File name extensions, 352, 355
File names
maximum length, setting, 354
retrieving in File Open, File Save As dialog boxes, 350–351, 354, 544–545
temporary, 1066
File Open dialog box, 350–357, 544–545
File Save As dialog box, 350–357
File statistics, 574–575
File Transfer Protocol. See FTP (File Transfer Protocol).
File types, specifying, 356–357
FileLen function, 548
FileName property
Common Dialog controls, 350–351, 354
file list box control, 569
multimedia MCI control, 745
FileObject, 573–574
Files
closing, 564
copying, 572. See also Clipboard object.
creating, 352, 546–548
deleting, 574
file numbers, 548
file statistics, 574–575
FileObject, 572–575
FileSystemObject, 543, 572–577
length of, 548–549
moving, 573–574
opening, 549–550, 565, 566, 745. See also File Open dialog box.
saving, 564–565, 566. See also File Save As dialog box.
temporary file names, 1066
TextStream objects, 575–579
transferring. See FTP (File Transfer Protocol).
FileSystemObject, 543, 572–577
FileTitle property, 351, 354
Fill color, 601–602
Fill pattern, 602
FillColor property
controls, 585
forms, 585, 601–602
picture boxes, 601–602
shape control, 453
FillStyle property
forms and picture boxes, 602
shape control, 452
Filters, 356–357
Financial functions, 116
Fix function, 90, 113
Fixed-length strings, 101
FixedCols, FixedRows properties, 393, 400
Flags property, 350, 352–353, 358, 360–361, 365–366
Flat scroll bars, 283–284, 294–296. See also Scroll bars.
Flex grid control, 373–374
adding to forms, 392–393
borders, 400
columns, dragging, 402–403
connecting to databases, 393, 403–404, 847
data entry, 394, 395, 397–399
events
KeyPress event, 395
LeaveCell event, 399
MouseDown event, 402
formatting cells, 401
grid lines, 400
labeling rows and columns, 400
properties
BorderStyle property, 400
CellFont… properties, 401
Col, Cols properties, 393
ColPosition property, 402
DataSource property, 393, 404
FixedCols, FixedRows properties, 393, 400
GridLines property, 400
GridLineWidth property, 400
MouseCol property, 402
Row, Rows property, 393
Sort property, 401
Text property, 393, 394
TextArray property, 400
resetting focus on specific cells, 396
sorting data, 401
using as spreadsheet, 393–399
Flipping images, 333–334, 630–631
Focus
cells in flex grid control, 396
giving to Windows applications, 112
label controls, 447
resetting after button click, 218, 234
setting when form loads, 234
tab order of controls, 129–130, 975
Font… properties
buttons, 232
Color dialog box, 358–359
label control, 445
picture boxes, 329
Font dialog box, 358–361
Font object, 590
Font property, 231–232
FontCount property, 591, 608
Fonts
customizing in IDE, 50–51
determining fonts available, 590–591
setting attributes for buttons, 231–232
setting attributes in RTF boxes, 212–214
Fonts property, 590–591, 608
Footnotes, in Help files, 1065
For Each loop, 108
For loop, 108
ForeColor property
buttons, 231
forms and controls, 585
Foreign keys, 776
Form designers, 48
Form Editor toolbar, IDE, 61, 62–63
Form Layout window, IDE, 47–48
Form-level variables, 7, 8, 91
Form Load event, 8, 588. See also Initialize event.
Format function, 90, 101, 102
Format$ function, 115, 414–415
Format menu, 43, 52–53
Formatting date and time values, 114–115, 413–415, 429
Formatting flex grid control cells, 401
Formatting string expressions, 102
Formatting text, 329–330, 445–446, 589, 710. See also RTF boxes.
Forms, 10. See also MDI forms.
active form, determining, 992–993
adding code to, 49
adding controls, 48
adding menus to, 165–168
arrays of forms, 142–143
background color, 617
browser forms, 692
clearing drawing area, 585
components of, 118–119
Controls collection, 993–994
coordinate systems, 133, 606–607
creating at runtime, 138
current form, referencing in code, 128
displaying in Web pages, 682–683. See also ActiveX documents.
drag and drop operations, 924–925, 982–990
drawing in forms, 459, 591–600, 602–607
enabling and disabling at runtime, 151
events
DragDrop event, 925, 977, 978–981
DragOver event, 982–983
MouseDown event, 186
Paint event, 584
Resize event, 608–609
form-level variables, 91
icons in Windows 95 taskbar, 995
keystrokes, intercepting, 995–996
layers, 611–612
loading, 136
LoadPicture function, 617
making immovable, 996
managing using Project Explorer, 45
maximizing and minimizing at runtime, 122, 151
methods
Arrange method, 141
Circle method, 459
Cls method, 585, 621
Hide method, 137
Line method, 458
Move method, 978
Point method, 604
PSet method, 604
Show method, 136, 147, 961, 962
moving controls, 131
multiple forms, 134–136
passing to procedures, 150–151, 992
positioning off screen, 69
predefined forms, 57, 58–59
printing graphics, 610–611
properties
AutoRedraw property, 129, 584, 610, 611–612
BackColor property, 585, 617
BorderColor property, 585
BorderStyle property, 123
Caption property, 121
ControlBox property, 122
CurrentX, CurrentY properties, 588
DrawMode property, 604–606
DrawStyle property, 602–603
DrawWidth property, 602–603
Enabled property, 151
FillColor property, 585, 601–602
FillStyle property, 602
Font… properties, 589
ForeColor property, 585
Height property, 133
Image property, 648
KeyPreview property, 995–996
Left property, 133
MDIChild property, 139
Moveable property, 996
Picture property, 617, 648
ScaleHeight property, 133
ScaleLeft property, 133
ScaleMode property, 17, 133, 606–607, 636
ScaleTop property, 133
ScaleWidth property, 133
ShowInTaskbar property, 995
StartUpPosition property, 995
Top property, 133
Width property, 133
WindowState property, 151
redrawing, 129, 584
resizing graphics, 608–609
showing and hiding controls, 132
showing and hiding forms, 136, 137
showing from code components, 961
startup forms, 55, 61, 69, 137
startup position, 995
title bar text, 121, 802–803
Z-order position, 810–812
Forward button, Web browsers, 704
Forward method, 719
Frame control, 435
adding to forms, 439
aligning controls, 442
dragging and dropping, 440–442
grouping controls, 246, 442–443
location and size, 440
methods
Drag method, 440–441
Move method, 440
properties
Appearance property, 439
Caption property, 439
Height property, 440
Left property, 440
ToolTipText property, 439
Top property, 440
Width property, 440
Frames, 717, 769. See also Frame control.
Frames property, 769
Free disk space, determining, 813–814
FreeFile function, 548
Freehand line drawing, 599–600
Freeing memory, 647–648, 809
Friend keyword, 13, 96, 946, 950
FRM files (form files), 16–22, 26
From property, 770
FromPage property, 364
Front layer of forms, 611
FTP (File Transfer Protocol), 697, 727–734, 1066–1068. See also Internet transfer control.
Functions
calling, 98
declaring, 97–98
DLL functions, 775–776
variable values, preserving, 99–100
FV function, 116

G

Gdi32.dll, 774
GET (FTP command), 730
GET (HTTP command), 735
Get/Let properties, code components, 947–949
Get procedure, 667–668, 669, 947–949
Get statement, 558–564
GetAllSettings Windows API function, 999
GetCapture Windows API function, 790–793, 800–802
GetChunk method, 729
GetData method, 332, 610, 984, 987
GetDC method, 780
GetDiskFreeSpace Windows API function, 813–814
GetFile method, 573
GetNumTicks method, 299
GetObject function, 941–942
GetSetting Windows API function, 192–193, 997–998
GetTempName method, 1066
GetText method, 205
GetWindowsDirectory Windows API function, 814–815
GetWindowText Windows API function, 802–803
Global items, 10
Global object, Visual Basic, 994
Global objects, 935, 959–960
Global variables, 10, 37, 91
GlobalAlloc Windows API function, 805, 807
GlobalFree Windows API function, 809, 810
GlobalLock Windows API function, 805, 806, 807
GlobalMultiUse value, 937, 960
GlobalSingleUse value, 937, 960
GlobaUnlock Windows API function, 808–809
GoBack method, 704
GoForward method, 704
GoHome method, 701, 705
GoSearch method, 705
GotFocus event, 235
Graphical buttons, 248
GraphicCell array, 629
Graphics
adding to ActiveX controls, 655, 657
bitmaps, 190–192, 793–794
copying to Clipboard, 609
drawing
boxes, 593–594
circles, 324–325, 450, 459, 594–595
clearing drawing area, 585
freehand lines, 599–600
images, 622–623
lines, 591–592, 782–783
in picture boxes, 323–326
points, 604
setting drawing mode, 604–606, 788–789
setting drawing pen, 604–606, 786–788
setting drawing position, 782–783
setting drawing scales, 606–607
setting drawing style, 602–603
setting drawing width, 602–603
text, 588–589
fill color and patterns, 601–602
freeing memory used by, 647–648
layering, 611–612
manipulating at pixel level, 635–647
pasting from Clipboard, 610
printing, 610–611
redrawing, 584
resizing, 608–609
Graphics controls, vs. graphics methods, 582–583
Graying out menu items, 180–181
Grayscale images, 637–640
Grid controls, 373–374. See also Flex grid control.
Grid lines, 53, 453
GridLines property, 400
GridLineWidth property, 400
Grippers, 467
Grouping buttons in toolbars, 478
Grouping controls in frame controls, 442–443
Grouping controls in picture boxes, 322
Grouping option buttons, 246

H

Handle property, 336
Handles
device context handles, 780
memory handles, 805, 806
picture box handles, 336
window handles, 800–802, 811
Handshaking property, 425
Hayes-type modem commands, 423–424
HDC property, 336, 364, 780
HEAD (HTTP command), 735
Header files, included in DLLs, 816–818
Height property
buttons, 239
forms, 133
frame control, 440
label control, 443
picture boxes, 338, 607
Screen object, 608
shape control, 454
Help button, displaying in Common Dialog controls, 353
Help files, 1040
compiling, 1060
displaying, 368–370, 1061–1062
Help projects, 1049–1050
index, 1058
online help, 1063
RTF files, creating, 1051–1060
Help menu, 44, 165
Help Workshop, 369, 1049–1050, 1060
HelpCommand property, 368
HelpFile property, 368
Hex function, 90
HideSelection property, 204
Hiding and showing controls, 132
Hiding and showing menus and menu items, 184
Hiding and showing scroll bars, 292
Hiding and showing shapes, 455
Hiding and showing windows in IDE, 73
Highlighting, turning on and off, 204
Histograms, 387
Home button, Web browsers, 705
Horizontal scroll bars, 286. See also Scroll bars.
Horizontal Spacing item, Format menu, 52–53
Hotspot targets, Help files, 1055–1057
Hotspots, Help files, 1053–1055
Hour function, 90
HPJ files, 1049–1050
HTM files, 707
HTML controls, 712–713
HTML tags, 710
HTTP (Hypertext Transport Protocol), 697–698, 735–737
Hungarian prefix notation, 776–777
HWnd property, 336, 759, 761, 991
HWndDisplay property, 759, 761
Hyperbolic trigonometric functions, 114
Hyperlinks, in DHTML pages, 716–717

I

Icon mode, list views, 519
Icon property, 522–523
Icons
adding to list view items, 522–524
for applications, specifying, 1046
custom mouse icon, setting, 608
of forms, in Windows 95 taskbar, 995
of OLE objects, displaying, 903–904
IDE (Integrated Development Environment)
ActiveX Designers, 77
Add-Ins, 65–66
Auto List Members feature, 70, 72
bookmarks, 78–79
code windows, 49
components of, 42–43
customizing, 50–51, 67–69
Data Tips, 70, 72
design time grid, 53–54, 453
form designers, 48
Form Layout window, 47–48
hiding and displaying windows, 73
menu bar, 43–44
Object Browser, 79, 938
procedure definitions, viewing, 74
Project Explorer, 45
Project menu, 76–77
Properties window, 46–47
Quick Info feature, 70, 72
Syntax Checking, 71, 72
text, searching files for, 74
toolbars, 44, 61, 67–69
toolbox, 48
variable definitions, viewing, 74
VBW files (project files), 16
If…Else statement, 104
Illusion of motion in images, 645–646
Image combo boxes, 277–279
Image controls, 312, 617–618
adding to forms, 338–339
binding to data controls, 847
events supported by, 618
freeing memory used by graphics, 648
loading images at runtime, 619–620
vs. picture boxes, 614–615
properties
BorderStyle property, 618
Picture property, 339–340, 618, 648
Stretch property, 339–340, 618, 633
stretching images to fit control, 339–340, 633
Image element, DHTML, 710
Image list control, 501
adding images to list, 507
adding to forms, 507
animation using timer control, 419–421
image properties
Index property, 507
Key property, 507, 509–510
ListImages collection, 327, 507
size of images, 508
using with image combo boxes, 277–278
using with other controls, 508–509
using with picture boxes, 326–327
using with tab strips, 534
using with toolbar buttons, 475
using with tree views, 515–517
Image maps, 318–319
Image property, 316, 336, 515, 648
ImageList property, 476, 508, 534
Images
adding to ActiveX controls, 655
adding to controls, 616
adding to DHTML pages, 710–711
adding to forms, 617
adding to image list control, 507
adding to toolbar buttons, 475–476
adding to tree views, 515–517
capturing from screen, 794–799
Clipboard, copying and pasting, 609
dimensions of in picture boxes, 607
displaying in controls, 616
displaying in status bars, 489
displaying in Windows Common Controls, 616
editing using picture clip controls, 623
erasing, 621
filling, 601–602
flipping, 630–631
freeing memory used by graphics, 647–648
loading at runtime, 619–620
manipulating at pixel level, 635–647
printing, 610–611
saving to disk, 620
selecting in picture clip controls, 625–630
setting drawing mode, 604–606
setting drawing scales, 606–607
setting drawing style, 602–603
storing in memory, 621–622
stretching, 632–633
stretching and flipping in picture boxes, 333–334
<IMG> HTML tag, 710
Immediate menus, 175–176. See also Toolbars.
Immediate window, 1035–1036
In-place editing, OLE objects, 896, 912, 931
In-process servers (ActiveX DLLs), 935, 945
methods, passing arguments to, 951–953
registering, 957
threading models, 936, 963
Inbox, Microsoft Exchange, 725
InBufferCount property, 409, 424
InBufferSize property, 408, 422
Indenting menu items, 168–169
Indenting program code, 38
Indenting text in RTF boxes, 211–212, 214–215
Index object, DAO, 825, 861–863
Index property, 233–234, 471, 475, 507, 872, 873
Indexes, Help files, 1058
Indices
combo box items, 269, 272, 276–277
database indices, 824, 861–863
list box items, 255–256, 258, 259, 276–277
loop indices, referencing, 108
Information hiding, 37
Initial directory, File Open and File Save As dialog boxes, 355–356
Initialize event, 655, 672, 958. See also Form Load event.
Initializing form-wide variables, 8
Initializing variables, 87
Input, InputLen properties, 409, 422, 423–424
Input # statement, 555
Input boxes, 149–150
Input$ statement, 557
InputBox function, 149–150
Insert Object dialog box, 900, 902, 905–907, 920–924
Insertable objects, 66–67
Insertion point, moving in RTF boxes, 217–219
InsertObjDlg method, OLE control, 898, 905
Installation directory (Windows), 814–815
Installation location for applications, 1047
Instancing property, 935–937, 959–960
InStr function, 101
Int function, 90, 113
Integer variable type, 89
Integrated Development Environment. See IDE (Integrated Development Environment).
Internet Explorer. See Microsoft Internet Explorer.
Internet transfer control, 727–728
adding to programs, 728
FTP operations, 697, 727–734, 1066–1068
HTTP operations, 697–698, 734–736
methods
Execute method, 697, 698, 727, 729–730, 735, 1067
GetChunk method, 729
OpenURL method, 697, 728–729, 730, 732–733, 734–736
properties
Password property, 727
StillExecuting property, 727
URL property, 1066
UserName property, 727
StateChanged event, 727, 729, 1068
Interval property, 412
Inverse trigonometric functions, calculating, 114
Invert pen setting, 604
IPmt function, 116
IRR function, 116
IsArray function, 93, 96
IsDate function, 93
IsEmpty function, 93
IsError function, 93, 1027
IsMissing function, 91, 93, 953–954
IsNull function, 93
IsNumeric function, 93
IsObject function, 93
Italic property, 590
Item method, 110
ItemClick event, 529
ItemData array, 275–276

J

Jet database engine, 824–825
Jump tags, Help files, 1054

K

Kernel32.dll, 774
Key property
image list images, 507, 509–510
status bar panels, 490
toolbar buttons, 125, 471
tree view nodes, 512
Keyboard interface, 155
access characters, 168–171, 235, 447
shortcut keys, 171–173
tab order of controls, 129–130, 975
KeyDown event, 204, 207
KeyPress event, 206, 395, 701
KeyPreview property, 995–996
Keystrokes
intercepting at form level, 995–996
sending to Windows applications, 110–112
KeyUp event, 207

L

Label control, 425–436
access keys, controls without captions, 447
adding to forms, 443–444
aligning text, 446
binding to data controls, 847
events
Click event, 446
DblClick event, 446
formatting text, 445–446
properties
AutoSize property, 445
Caption property, 443
Font… properties, 445
Height property, 443
Top property, 443
UseMnemonic property, 447
Width property, 443
WordWrap property, 445
text, displaying, 203
vs. text boxes, 444–445
Labels in error handlers, 1012
LargeChange property, 287, 298–299
LastDLLError property, 1023
Layers, 611–612, 810–812
LBound function, 96
LCase function, 90, 101
Learning Edition, Visual Basic, 2
LeaveCell event, 399
Left function, 101
Left property
buttons, 239
forms, 133
frame control, 440
label control, 443
shape control, 454
Len function, 101, 204
Let procedure, 667–668, 669, 947–949
Libraries, 940, 941, 962. See also DLLs (Dynamic Link Libraries).
Lightening images, 640–642
Lightweight controls, 990–991
Line charts, 384–385
Line control, 437–438, 455–457, 459
Line Input statement, 556–557
Line method
B argument, 593
drawing boxes, 593–594
drawing freehand lines, 599–600
drawing lines, 591–592
F argument, 602
forms, 458
picture boxes, 325–326
Line numbers, in error handling, 1014
Lines. See also Graphics.
automatic alignment, turning off, 456–457
drawing freehand lines, 599–600
drawing in device contexts, 782–783
drawing in forms and picture boxes, 591
drawing in picture boxes, 325–326
drawing using line control, 437–438, 455–458
drawing using Line method, 458, 591–594, 599–600
grid lines, 53
LineTo Windows API function, 782–783
Linking OLE objects, 897–899, 902, 905–907, 908–911
List boxes, 252–253
binding to data controls, 847
checkmarks, 264
clearing list, 264–265
events
Change event, 253
Click event, 253, 256–257, 261
DblClick event, 253, 256–257, 261
indices of items, 255–256, 258, 259, 276–277
ItemData array, 275–276
methods
AddItem method, 254–255
Clear method, 264
RemoveItem method, 257–258
multiselect list boxes, 257, 261–262
number of items, 254, 259
numeric data, connecting to items, 275–276
properties
Columns property, 263
List property, 254–256, 257
ListCount property, 254–255, 259
ListIndex property, 255–256
MultiSelect property, 261–262
NewIndex property, 276–277
Selected property, 257
Sorted property, 258
Style property, 264
TopIndex property, 274–275
removing items, 257–258
scrolling horizontally, 263
Selected array, 260
selected items, 255, 256–257, 259–260, 262, 275
sorting items, 258
topmost item, 274–275
List mode, list views, 519
List property, 254–256, 257, 265
List views, 504
adding to forms, 518
columns, 525–526, 527–528, 530
events
ColumnClick event, 529
ItemClick event, 529
items, 520–521, 522–523, 529
ListItem properties
Icon property, 522–523
Text property, 527–528
ListItems collection, 520–521
ListSubItems collection, 527–528
view modes, 504, 519, 524–525
View property, 524, 525
ListCount property, 254–255, 259, 273–274
ListField property, 849
ListImages array, 327
ListImages collection, 507
ListIndex property, 255–256, 267–268, 270
ListSubItems collection, 527–528
Literal suffix symbols, numeric values, 88
Load event, 588
Load statement, 136, 188, 242, 973–975
LoadFile method, 223, 565
LoadPicture function
adding down pictures to buttons, 241
controls, 616, 620
forms, 617
image controls, 620
picture boxes, 316, 566, 619, 620
Picture objects, 620, 621
setting Picture property at runtime, 240, 248
LoadResPicture function, 316
Localization, 316
LocationName property, 701, 705
Locked property, 202, 272
Locking memory, 805, 806, 807
LOF function, 549, 557
Log function, 113
Logarithm (to base N) function, calculating, 114
Logical operators, precedence of, 103
Long variable type, 89
Loop index, referencing, 108
Loop statements
Do loop, 107
For Each loop, 108
For loop, 108
nesting, 37
With statement, 109
While loop, 109
LostFocus event, 235
LS (FTP command), 730
LSet function, 101
LTrim function, 101
Lz32.dll, 774

M

Magic numbers, 36–37. See also Constants.
Main() procedure, 54, 55, 943
Make ProjectName.exe item, File menu, 44
Make Same Size item, Format menu, 52
MAPI controls, 697, 718. See also MAPIMessages control; MAPISession control.
MAPIMessages control, 697, 719. See also Email functionality.
compose buffer, 719
methods
Compose method, 721
Copy method, 719
Fetch method, 719, 725
methods supported, 719
Send method, 722–723
SignOff method, 722–723
properties
FetchMsgType property, 719
FetchSorted property, 719
FetchUnreadOnly property, 719
MsgCount property, 725
MsgIndex property, 719, 721, 726
MsgNoteText property, 719, 726
properties supported, 720
SessionID property, 721, 725
read buffer, 719
MAPISession control, 697, 719. See also Email functionality.
DownLoadMail property, 721, 725
SessionID property, 721, 725
SignOn method, 721, 725
Marshaling, 935, 951
Mask Not Pen pen setting, 604
Mask Pen Not pen setting, 604
Mask Pen pen setting, 605
MaskedEdit control, 847
Math functions, built-in, 113
Max property
Common Dialog controls, 361–362, 366
scroll bars, 286–287
slider controls, 298
updown controls, 308
MaxFileSize property, 354
Maximize buttons, on forms, 122
Maximizing forms at runtime, 151
MaxLength property, 201
MCI_… commands, 748–749
MdDir statement, 572
MDI child forms, 120. See also MDI forms.
creating, 139
loading, 137
referenced in FRM files, 26
MDI forms, 119–120. See also MDI child forms.
adding picture boxes, 322–323
arranging child windows, 140–141
arrays of child windows, 142–143
coordinating data between child windows, 144–145
displaying child windows, 139
menus, 181, 182–183
multiple documents, opening, 141–142
MDI (Multiple Document Interface). See MDI child forms; MDI forms.
MDIChild property, 139
Me keyword, 128
Measurement units, 17, 53, 133, 606–607
Media Control Interface (MCI) devices, 740–741, 744. See also Multimedia MCI control.
Memory
allocating, 805–806, 807
deallocating, 809, 810
locking, 805, 806, 807
reading data from, 808, 809
retrieving pointers to, 806, 807
storing data in, 806, 808
unlocking, 808–809
used by code components, freeing, 960–961
used by graphics, freeing, 647–648
Menu bar, 43–44, 68, 119. See also Menu items; Menus.
Menu control prefixes, 33
Menu Editor. See also Menu items; Menus.
access characters, 168–171
checkmarks, 179
creating menus, 165–168
deleting menu items, 168
disabling (graying out) menu items, 180
inserting menu items, 168
menu separators, 168
rearranging menu items, 168–169
submenus, 173–175
Menu items. See also Menu Editor; Menus.
access characters, 155, 168–171
adding and deleting at runtime, 187–189
adding code to, 167–168
checkmarks, 178–179
connecting toolbar buttons to, 473
creating, 166–168
deleting, 168
design standards, 163–165
disabling (graying out), 180–181
ellipses in item names, 155
exclamation points in item names, 156, 176
hiding and showing, 184
indenting and outdenting, 168–169
inserting, 168
keyboard shortcuts, 155
moving to menu bar, 68
naming conventions, 155–156
properties
Checked property, 179
Enabled property, 181
Visible property, 184, 188
rearranging, 168–169
shortcut keys, 171–173
Menu separators, adding, 168
Menus
access characters, 155, 168–171
adding bitmaps to, 190–192
“bang” menus, 175–176
components of, 154–155
creating, 166
designing, 155–156, 157, 163–168
hiding and showing, 184
IDE menus, 67–69
immediate menus, 175–176
listing open windows, 182–183
in MDI forms, 181
menu control prefixes, 33
menu separators, 168
ModifyMenu Windows API function, 190
naming conventions, 155–156
pop-up menus, 184–185, 186–187
predefined menus, 56–57, 59, 176–178
properties
Caption property, 166
Name property, 166
Visible property, 184
WindowList property, 183
submenus, 173–175
Merge Not Pen pen setting, 605
Merge Pen Not pen setting, 605
Merge Pen pen setting, 605
Message boxes, 148–149, 1030
Messages. See Email functionality.
Metafiles, drawing to, 623
Methods. See also names of specific methods; Procedures.
adding to ActiveX controls, 674–678
in code components, 942, 950, 951–954
viewing in Object Browser, 79
Microsoft DAO Object Library, 857
Microsoft Exchange utility, 697, 718, 721, 723, 725
Microsoft Help Workshop, 369, 1049–1050, 1060
Microsoft Internet Explorer. See also Web browser control.
testing ActiveX controls, 655–656, 661–662
testing ActiveX documents, 690
testing DHTML pages, 717
Web browsers, creating, 696
Microsoft Win32 Software Development Kit, 779
Microsoft XML parser, 698
MID files, playing, 757–759
Mid function, 101
Min/max buttons, 122
Min property
Common Dialog controls, 361–362, 366
scroll bars, 286–287
slider controls, 298
updown controls, 308
Minimize buttons, 122
Minimizing forms, 151
Minute function, 90
MIRR function, 116
MiscFlags property, 931
MKDIR (FTP command), 730
Modal display, 147, 996–997
Mode property, 741, 750
Modem command strings, 423–424
ModifyMenu Windows API function, 190
Modular program design, 37
Module-level variables, 91
Modules, 10. See also Class modules.
BAS files (module files), 22
DLL procedures, declaring, 775
managing using Project Explorer, 45
module-level variables, 91
Month function, 90
MonthView control, 410, 428–429
Motion, illusion of, adding to images, 645–646
Mouse events
button controls, 244
capturing outside program’s window, 789–793
drawing freehand lines, 599–600
OLE controls, 913
right mouse button events, 186
Mouse location, reporting in pixels, 607
Mouse pointer, 220–221, 608
MouseCol property, 402
MouseDown event
buttons, 244
capturing outside program’s window, 792
drag and drop operations, 977
flex grid control, 402
forms, 186
picture boxes, 318
MouseIcon property, 608
MouseMove event
capturing outside program’s window, 791–792
freehand lines, drawing, 599–600
MousePointer property, 608
MouseUp event
buttons, 244
capturing outside program’s window, 793
Move method
buttons, 239
controls, 131–132
FileObject, 573
forms, 978
frame control, 440
shape control, 454–455
Moveable property, 996
MoveFile method, 573
MoveFirst method
data controls, 846
rdoResultset object, 879–880
Recordset object, ADO, 890
Recordset object, DAO, 869–870
MoveLast method
data controls, 846–847
rdoResultset object, 880–881
Recordset object, ADO, 890–891
Recordset object, DAO, 870
MoveMemory Windows API function, 805, 806, 808, 809
MoveNext method
data controls, 845–846
rdoResultset object, 881–882
Recordset object, ADO, 891
Recordset object, DAO, 870–871
MovePrevious method
data controls, 846
rdoResultset object, 882–883
Recordset object, ADO, 891–892
Recordset object, DAO, 871–872
MoveToEx Windows API function, 782–783
MPG files, playing, 761–763
Mpr.dll, 774
MSFlexGrid control, 847
MsgBox function, 148–149, 150
MsgConversationID property, 720
MsgCount property, 720, 725
MsgDateReceived property, 720
MsgID property, 720
MsgIndex property, 719, 720, 721, 726
MsgNoteText property, 719, 720, 726
MsgOrigAddress property, 720
MsgRead property, 720
MsgReceiptRequested property, 720
MsgSent property, 720
MsgSubject property, 720
MsgType property, 720
MSWLess.ocx ActiveX control group, 991
Multiline property, 200, 201
Multimedia, 740, 771–772. See also Multimedia MCI control.
Multimedia MCI control, 740–741
adding to forms, 743–744
animation, 769
AVI files, 759–761
CDs, playing from CD-ROM drive, 753–755
closing, 753
commands, 747–749
Back command, 769
Close command, 753
Eject command, 755
Open command, 741, 744–745
Pause command, 749–750
Step command, 769
Stop command, 749–750, 753
controlling at runtime, 741, 747–749
current operation, 750–752
device, opening, 744–745
elapsed time, 752
ending point in file, 770
error handling, 764–768
events
Done event, 741, 763–764, 768
StatusUpdate event, 741, 750
files, opening, 745
MID files, 757–759
MPG files, 761–763
notification of command execution, 763–764
overhead, 771
vs. PlaySound Windows API function, 771
properties
CanStep property, 769
Command property, 741, 744–745, 747–749
DeviceType property, 744–745
Error property, 764–768
ErrorMessages property, 764–768
FileName property, 745
Frames property, 769
hWndDisplay property, 759, 761
Mode property, 741, 750
Notify property, 741, 763–764
Orientation property, 743
Position property, 752
properties using current time format, 746
From property, 770
To property, 770
TimeFormat property, 746, 770
UpdateInterval property, 750
Visible property, 749
Wait property, 771
recorded data, saving to disk, 753
resuming playback, 749–750
showing and hiding, 749
starting point in file, 770
stopping playback, 749
time formats, 746–747
trappable errors, 767–768
waiting until current operation is complete, 771
WAV files, 755–757
Multiple Document Interface. See MDI child forms; MDI forms.
Multiple documents, opening, 141
Multiple forms, 134–136
Multiple OLE objects, 914–924
Multiselect list boxes, 257, 261–262, 264
MultiSelect property, 261–262, 429
MultiUse value, 937, 959

N

Name property, 166, 233–234, 590
Names of variables, misspelling, 38. See also Naming conventions.
Naming conventions. See also Programming conventions, Microsoft.
constant prefixes, 33
control prefixes, 29–32
Data Access Object prefixes, 32
menu control prefixes, 33
menus and menu items, 155–156
variable prefixes, 28–29
variable scope prefixes, 28
Navigate method, 700
Nested conditionals and loops, 37
Nested error handling, 1024–1025
Netapi32.dll, 774
New keyword, 87, 94, 138, 940–941
NewIndex property, 276–277
NewPage method, 611
Next command (multimedia MCI control), 748
NodeClick event, 518
Nodes, tree view, 511–518. See also Tree views.
Nodes collection, tree views, 511–512
NonModalAllowed property, 962
Nop pen setting, 605
Not Copy Pen pen setting, 604
Not Mask Pen pen setting, 604
Not Merge Pen pen setting, 604
Not Xor Pen pen setting, 605
Nothing keyword, 958–959, 961
Notification of multimedia control command execution, 763–764
Notify property, 741, 763–764
Now function, 115, 414
NPer function, 116
NPV function, 116
Number property, 1020–1021
Numeric values
connecting data to list box items, 275–276
converting between string and numeric values, 102
date and time values, 114–115
financial functions, 116
math functions, built-in, 113
trigonometric functions, calculated, 114

O

Object Browser, 79, 938
<OBJECT> HTML tag, 657
Object references, 951–953
Object type, 970–971
Object variable type, 89, 970–971
Objects
adding code to, 49
code components, 934–935, 940–942, 960–961
insertable objects, 66–67
predefined objects, Visual Basic, 56–59, 176–178
Oct function, 90
OCX files (ActiveX control files), 651, 1043
ODBC data sources, 836–837
ODBCDirect, 853–854
OLE automation servers. See Code components.
OLE container control. See OLE control.
OLE containers, 896
OLE control, 896–897
adding to forms, 900
border, removing, 903
Class property, 904
display options, 903–904
events
OLECompleteDrag event, 989–990
OLEDragDrop event, 984, 986–989
OLEStartDrag event, 983
Updated event, 930–931
loading at runtime, 920–924
methods
Close method, 908
Delete method, 926
Drag method, 924–925
InsertObjDlg method, 905
OLEDrag method, 983–985
Paste method, 927
PasteOK method, 927
PasteSpecialDlg method, 908–911
ReadFromFile method, 898, 929–930
SaveToFile method, 898, 929–930
pop-up menu, 904
primary verbs, executing, 914
properties
Action property, 897
ActiveControl property, 915
AppIsRunning property, 908, 916
AutoActivate property, 912
AutoVerbMenu property, 912–913
Border property, 903
DisplayType property, 903–904
MiscFlags property, 931
OLEDropMode property, 986
OLEType property, 898, 906, 914
OLETypeAllowed property, 899, 906
PasteOK property, 908–909
SizeMode property, 903, 905, 928
SourceDoc property, 897, 904
resizing options, 903, 905
OLE DB. See ADO (ActiveX Data Objects).
OLE (Object Linking and Embedding), 896–897, 897–899. See also OLE control; OLE objects.
OLE objects
activating, 912–914
clipboard, copying and pasting, 927
deactivating, 907–908, 916
deleting, 926
determining if object has been updated, 930–931
determining whether linked or embedded, 914
displaying content or icons, 903–904
DoVerb method, 913–914
drag and drop operations, 924–925, 983–990
editing in place, 896, 912, 931
embedded objects, 897–899, 929–930
enlarging, 928
existing files, linking or embedding, 902, 904, 905–907, 908–911
linking, 897–899
methods supported, 898
multiple objects, 914–924
new objects, creating and embedding, 900, 905–907
opening, 896, 912
shrinking, 928
verifying insertion in OLE control, 905–906
OLE servers, 896
OLE verbs, 897, 912–914
OLECompleteDrag event, 989–990
OLEDrag method, 983–985
OLEDragDrop event, 984, 986–989
OLEDropMode property, 984, 986
OLEStartDrag event, 983
OLEType property, 898, 906, 914
OLETypeAllowed property, 899, 906
On Error GoTo 0 statement, 1015–1016
On Error GoTo Label statement, 1012–1013
On Error GoTo line# statement, 1013
On Error Resume Next statement, 1015
OnComm event, 409, 422, 424, 426–427
Online help system, 1063–1064. See also Help files.
Online user registration, 1040, 1065–1068
Open command, 741, 748
Open method, 742, 884–887, 893–894
Open statement, 546, 549–550
OpenConnection method, 876–877
OpenDatabase method, 865–867
Opening OLE objects, 896, 912
OpenRecordset method, 863–865, 866–867
OpenResultset method, 877–879
OpenTextFile method, 576–577
OpenURL method, 697, 728–729, 730, 732–733, 734–736
Operator precedence, 102–104
Optimization, 64–65, 75–76
Option Base statement, 94, 96
Option buttons, 227
adding and removing at runtime, 242
background color, 229–230
button releases, 244
combining with checkboxes, 249–250
in control arrays, 233–234, 242
disabling, 236–237
displaying images in, 237, 239–240, 241, 616
events
Click event, 232–233
DblClick event, 233
GotFocus event, 235
Key… events, 244
LostFocus event, 235
Mouse… events, 244
focus, 234, 236
graphical option buttons, 248
grouping, 246
keyboard access, 235
methods
Move method, 239
SetFocus method, 234
moving, 239
passing to procedures, 243
properties
BackColor property, 230
Caption property, 229, 235
Default property, 234, 236
DisabledPicture property, 237
DownPicture property, 241, 248
Enabled property, 237
Font property, 231–232
ForeColor property, 231
Height property, 239
Index property, 233–234
Left property, 239
Name property, 233–234
Picture property, 239–240, 248
Style property, 230, 237, 239–240, 241, 616
TabIndex property, 236
TabStop property, 236
ToolTipText property, 238
Top property, 239
Value property, 247–248
Visible property, 237–238
Width property, 239
resizing, 239
responding to button clicks, 232–233
setting caption, 229
showing and hiding, 237–238
state of buttons, 247–248
tab order, 236
text color, 230–231
tool tips, 238
Option Compare statement, 101
Option Explicit statement, 38, 88
Option Private Module statement, 91
Optional arguments, 97, 98, 953–954
Optional keyword, 97, 98, 953–954
Orientation property, 295, 297, 367–368, 743
Origin of coordinate systems, 583
Out-of-process servers (ActiveX EXEs), 935, 945
creating, 943–945
methods, passing arguments to, 951–953
properties, setting, 947
registering, 958
threading models, 936, 963
Outbox, Microsoft Exchange, 723
OutBufferCount, OutBufferSize properties, 409, 425
Outdenting menu items, 169
Output property, 409, 423–424, 425
Ovals, drawing, 450
Overhead
image storage, 508
lightweight controls, 990–991
memory used by graphics, freeing, 647–648
multimedia MCI control, 771
optimizing, 75–76
picture boxes vs. image controls, 615
Variant variable type, 38, 89

P

Package And Deployment Wizard, 1039, 1043–1048
Page Designer, DHTML. See DHTML Page Designer.
Page orientation, setting, 367–368
Paint event, 584, 611–612, 657
PaintPicture method. See also Render method.
flipping images, 630–631
picture boxes, 333–334, 335, 619
printing graphics using Printer object, 610–611
stretching images, 632–633
Pairs of scroll bars, coordinating, 293
PanelClick, PanelDblClick events, 490
Panels, status bars, 127, 485–490
Paragraphs, indenting, 211–212
ParamArray keyword, 97, 98, 968
Parameter ADO object, 827
Parent property, 136
Parentheses, 104
Parsers, 698
Password control, 205–206
Password property, 727
PasswordChar property, 205–206
Passwords, 858
Paste method, OLE control, 898, 927
Paste Special menu item, OLE objects, 908–911
PasteOK property, 908–909, 927
PasteSpecialDlg method, OLE control, 898, 908–911
Pasting OLE objects from Clipboard, 927
Pasting pictures from Clipboard, 610
Path property, 568, 569
Patterns (fill patterns), 602
Pause command, multimedia MCI control, 748, 749
PDL (program design language), 35–36
Pens, 604–606, 786–788
Pentium FDIV error, disabling checks for, 65
Pentium Pro processor, optimizing for, 76
Performance
DLLs vs. EXE files, 684
optimizing, 64–65, 75–76
properties for out-of-process servers, setting, 947
Variant variable type, 89
Persistent properties, 671–674, 693–694
Picture boxes, 313–314, 618–619. See also Picture objects.
accessing images, 316
adjusting size to fit image, 317
aligning, 317
animation, 320–321
AVI files, displaying, 759–761
binding to data controls, 847
clearing images, 330
Clipboard, copying and pasting, 332, 609, 610
dimensions of images, 607
drawing in, 324–326, 450, 459, 588–589, 591–600
events
Click event, 318
mouse events, 318–319
Resize event, 608–609
filling images, 601–602
flipping images, 333, 630–631
freeing memory used by graphics, 647–648
grouping controls, 322
vs. image controls, 614–615
image lists, 326–327
image maps, 318–319
loading images at runtime, 619–620
methods
Circle method, 324
Cls method, 330, 621
Line method, 325–326
LoadPicture function, 619, 620
PaintPicture method, 333–334, 335, 619
Point method, 331, 604
Print method, 327, 588–589
PSet method, 326, 604
SavePicture method, 620
MPG files, displaying, 761–763
opening files, 566
pixel-level image manipulation, 331, 635–647
printing images, 335–336
properties
Align property, 317
AutoRedraw property, 328
AutoSize property, 317, 619
BorderStyle property, 619
CurrentX, CurrentY properties, 327–328, 588
DrawMode property, 604–606
DrawStyle property, 602–603
DrawWidth property, 602–603
FillColor property, 601–602
FillStyle property, 602
Font… properties, 329, 589
Handle property, 336
hDC property, 336
Height property, 338, 607
hWnd property, 336, 759, 761
Image property, 316, 336, 648
Picture property, 316, 320, 619, 648
ScaleHeight, ScaleWidth properties, 338, 607
ScaleMode property, 337–338, 606–607, 636
Width property, 338, 607
resizing graphics, 608–609
resizing to fit image, 619
saving files, 338, 566, 620
setting drawing mode, 604–606
setting drawing scales, 606–607
setting drawing style, 602–603
stretching images, 333, 632–633
text, 327, 329–330
units of measurement, 337–338
Windows handles, 336
Picture clip controls
adding to forms, 623–624
GraphicCell array, 629
properties
Clip property, 626
ClipHeight property, 626
ClipWidth property, 626
ClipX, ClipY properties, 626
Columns property, 629
Rows property, 629
selecting images in, 625–628, 629–630
Picture control, 190
Picture objects. See also Picture boxes.
arrays of, for animation sequences, 623, 634–635
drawing images using, 622–623
images
loading into, 620, 621
storing in memory, 621–622
LoadPicture function, 620, 621
Render method, 622–623
Picture property
buttons, 239–240, 248
forms, 617
freeing memory used by graphics, 648
image controls, 339–340, 618
picture boxes, 316, 320, 619
status bar panels, 489
Pictures, adding to buttons, 239–240, 241
Pie charts, 382–383
Pixels
accessing in picture boxes, 331
binary raster operation mode (ROP2), 788–789
drawing, 604
mouse location, reporting, 607
pixel-level image manipulation, 635–647
retrieving color of, 604
Play command (multimedia MCI control), 748
Play method, 742
PlaySound Windows API function, 770–805, 771, 776
Pmt function, 116
Point method, 331, 604
Pointers to memory, retrieving, 806, 807
Points, 326, 604
Pop-up links, Help files, 1058–1060
Pop-up menus, 184–185, 186–187, 904, 912–913
PortOpen property, 408, 423, 427–428
Position attribute, 710, 715
Position property, 752
Positioning startup forms, 69
Positioning windows in Z-order, 810–812
POST (HTTP command), 735
PPmt function, 116
Precedence (operator precedence), 102–104
Predefined dialog boxes, 146–147
Predefined elements, Visual Basic, 58, 176–178. See also Visual Component Manager.
Predefined forms, 57
Predefined menus, 59, 176–178
Prefixes
constant prefixes, 33
control prefixes, 29–32
Data Access Object prefixes, 32
Hungarian prefix notation, 776–777
menu control prefixes, 33, 156
variable prefixes, 28–29
variable scope prefixes, 28
Preserve keyword, 95
Prev command (multimedia MCI control), 748
Primary keys, 776
Primary verbs, executing for OLE objects, 914
Print # statement, 550–551
Print dialog box, 363–368
Print method, 588–589, 610–611
Print Setup dialog box, 365
Printer object
flipping images, 630–631
fonts available, 590–591
printing from Print dialog box, 363
printing graphics, 610–611
stretching images, 632–633
PrinterDefault property, 363
Printers, 365
Printers collection, 611
PrintForm method, 364, 610
Printing images, 335–336
Printing text, 223–224
Private keyword
declaring constants, 85
declaring DLL procedures, 775
declaring methods in code components, 950
declaring properties in class modules, 946
declaring subroutines, 96
declaring variables, 86
defined, 11
scope of procedures, restricting, 13
Private value, 937, 959
Private variables, 91
Procedure-level variables, 91
Procedure scope, 13
Procedures. See also Methods.
arguments, passing by value or reference, 776, 951–953
arrays, passing as arguments, 967–968
buttons, passing as arguments, 243
commenting conventions, 33–34
control arrays, passing as arguments, 968, 970–971
declared as Static, 13
design of, 37
DLL procedures, 775–776
forms, passing as arguments, 150–151, 992
functions, 97–98
global variables, passing as arguments, 37
procedure-level variables, 91
procedure scope, 13
subroutines, 96–97
variable values, preserving, 99–100
viewing definition in IDE, 74
in Windows API, 778–779
Product information, adding to projects, 59
Professional Edition, Visual Basic, 2
Profiles, Application Wizard, 23
Program design language (PDL), 35–36
Programming conventions, Microsoft
best coding practices, 36–38
commenting conventions, 33–34
constant prefixes, 33
control prefixes, 29–32
Data Access Object prefixes, 32
indentation of code, 38
menu control prefixes, 33
program design language (PDL), 35–36
software design process, 34–35
variable prefixes, 28–29
variable scope prefixes, 28
Programming defensively, 37
Programs, Visual Basic
entering break state, 116
linking to Visual C++ code, 816–818
online user registration, 1065–1068
terminating, 116, 136
using custom ActiveX controls, 664
windows, hiding, 136
Progress bars, 466–467, 491–493
Project Explorer window, 45, 77
Project groups, Visual Basic, 662–664
Project menu, IDE, 43, 76–77
Project Properties dialog box, 54, 55, 61, 137, 655–656, 683
Project types supported by Visual Basic, 2–3
Projects, Visual Basic. See also IDE (Integrated Development Environment).
adding ActiveX controls, 66–67
adding ActiveX Designers, 77
adding OLE controls, 900
adding Web browsers, 696
BAS files (module files), 22
components of, 9–10
converting to ActiveX documents, 683
creating using Application Wizard, 22–28
custom ActiveX controls, 664
FRM files (form files), 16–22
GlobalMultiUse objects, 959–960
insertable objects, adding to projects, 66–67
integrating Web browsers into, 691–692
optimizing, 75–76
saving to disk, 13–14
scope, 11–13
software design process, 35–36
splash screens, 24
startup forms, 55, 61, 69, 137
startup procedure, 54
VBP files (project files), 15
VBW files (project files), 16
version information, 59
Prompts in message boxes, 148
Properties. See also names of specific properties.
ActiveX controls, 666–674
ActiveX documents, 693–694
code components, 942, 946, 947–949
design-time vs. runtime, 46
managing using Properties window, 46–47
out-of-process servers, 947
viewing in Object Browser, 79
Properties collection, ADO, 828
Properties window, IDE, 46–47
Property Page Wizard, 680–681
Property pages, 680–681
PropertyBag objects, ActiveX controls, 671, 693–694
PropertyChanged method, 671–672, 693–694
Provider property, 828, 840
PSet method, 326, 604, 610–611
Public keyword
declaring arrays, 93
declaring constants, 85
declaring global items, 10
declaring methods in code components, 950
declaring properties in class modules, 946
declaring subroutines, 96
declaring variables, 86
defined, 11
PublicNotCreatable value, 937, 959
PUT (FTP command), 730
PUT (HTTP command), 735
Put statement, 552–553, 554, 564
PV function, 116
PWD (FTP command), 730

Q

QBColor function, 586
QueryDef DAO object, 825
Quick Info feature, 70, 72
Quick Watch window, 1033
QUIT (FTP command), 730

R

Radio buttons. See Option buttons.
Raise method, 1023–1024
RaiseEvent method, 679
Random access files, 542, 552–553, 558–561, 563–564
Randomize statement, 454
Raster operations, 788–789, 794
Rate function, 116
RDO (Remote Data Objects), 826, 854. See also Remote data control.
adding records, 844
creating result sets, 877–879
data-bound controls, 838–839, 847–848
data environment, 824
deleting records, 844–845
navigating databases, 845–847
navigating result set, 879–883
opening database connections, 876–877
opening databases, 838
rdocode example project, 875–884
refreshing data, 845
SQL statements, executing, 883
updating databases, 845
Rdocode example project, 875–884
RdoConnection object, 854, 877–879, 883
RdoEnvironment object, 876–877
RdoResultset object, 879–883
RdoTables collection, 827
Read buffer, MAPIMessages control, 719
Read method, 578
Read-only text boxes, 202
ReadFromFile method, OLE control, 898, 929–930
Reading from binary files, 561–563
Reading from random access files, 558–561
Reading from sequential files, 555–557
Reading RTF files into RTF boxes, 223
ReadLine method, 578
ReadProperties event, 671–672, 693–694
Record command, multimedia MCI control, 748
Record sets, ADO
adding records to, 888
binding controls to, 887
creating, 885–887
deleting records, 892–893
navigating, 890–892
refreshing, 888–889
updating records, 889–890
Record sets, DAO
adding records, 867–868
creating, 863–865
deleting records, 872
editing records, 868
navigating, 869–872
searching, 873
sorting records, 872
updating records, 868–869
Records
database records, 823–824
adding, 844, 867–868, 888
deleting, 844–845, 872, 892–893
editing, 868
entering data using Visual Data Manager, 833
navigating, 845–847, 869–872, 879–883, 890–892
refreshing and updating data, 845
searching, 873
sorting, 872
updating, 868–869, 889–890
random access files, 563–564
Recordset object, ADO, 827
methods
AddNew method, 888
Delete method, 892–893
MoveFirst method, 890
MoveLast method, 890–891
MoveNext method, 891
MovePrevious method, 891–892
Open method, 885–887, 893–894
Refresh method, 888–889
Update method, 889–890
Recordset object, DAO
creating record set, 863–865
methods
AddNew method, 867–868
Delete method, 872
Edit method, 868
MoveFirst method, 869–870
MoveLast method, 870
MoveNext method, 870–871
MovePrevious method, 871–872
OpenRecordset method, 866–867
Update method, 868–869
properties
BOF property, 871–872
EOF property, 870–871
Index property, 872, 873
Seek property, 873
Recordset property, 826, 844, 845, 846
RecordsetEvents, ADO, 828
RecordSource property, 826, 828, 835
Rectangle Windows API function, 785–786
Rectangles, drawing, 449, 785–786
RECV (FTP command), 730
ReDim statement, 11, 86, 94, 96
Redrawing form contents, 129
Redrawing graphics, 584
Reference, passing arguments by, 776
References to code components, adding, 938
Refresh button, Web browsers, 705
Refresh method, 705, 845
Refreshing record sets, 888–889
Refreshing screen. See Redrawing graphics.
Registering ActiveX controls with Windows, 656, 664
Registering in-process servers, 957
Registering ODBC data sources, 836–837
Registering out-of-process servers, 958
Registering programs online, 1040, 1065–1068
Registry, Windows. See Windows Registry.
Regsvr32.exe utility, 664
Relation DAO object, 825
Remote data control, 826–827. See also ADO data control; Data control; RDO (Remote Data Objects).
data-bound controls, 838–839
methods
AddNew method, 844
Delete method, 844–845
MoveFirst method, 846
MoveLast method, 846–847
MoveNext method, 845–846
MovePrevious method, 846
Refresh method, 845
UpdateRecord method, 845
properties
DataSource property, 838
DataSourceName property, 838
Resultset property, 844, 845, 846
SQL property, 827, 838
rdoTables collection, 827
Remote Data Objects. See RDO (Remote Data Objects).
Remote Data Service (RDS), 828
Remove method, 110
RemoveItem method, 257–258, 269
RENAME (FTP command), 730
Render method, 622–623. See also PaintPicture method.
Replacing text in RTF boxes, 221
ReplayAll method, 719
Reply method, 719
Report mode, list views, 519
Resize event, 608–609
Resizing buttons, 239
Resizing graphics, 608–609
ResolveName method, 720
Resource files, 316
RestoreToolbar method, 482
Result set (RDO), 877–883
Resultset property, 844, 845, 846
Resume Label statement, 1017–1018
Resume line# statement, 1018–1019
Resume Next statement, 1019–1020
Resume statement, 1016–1017
Return values, 98, 150, 775
RGB function, 216–217, 586
Rich text. See RTF boxes.
Right function, 101
Right mouse events, 186, 793
RightMargin property, 212
RMDIR (FTP command), 730
RmDir statement, 572
Rnd function, 113
ROP2 (binary raster operation) mode, 788–789
Rounded rectangles and squares, 451
Row property, 377–378, 393
RowCount property, 377–378
RowLabel property, 378
Rows property, 393, 629
RowSource property, 849
RSet function, 101
RTF boxes
binding to data controls, 847
creating, 198
inappropriate use of, 198–199
methods
Find method, 221
LoadFile method, 223, 565
SaveFile method, 222, 564–565
SelPrint method, 223–224
Span method, 208
moving insertion point, 217–219
opening files, 223, 565
printing text, 223–224
properties
BulletIndent property, 214–215
RightMargin property, 212
SelAlignment property, 216–217
SelBold property, 209–211
SelBullet property, 214–215
SelCharOffset property, 219–220
SelColor property, 216–217
SelFontName property, 213
SelFontSize property, 213
SelHangingIndent property, 211–212
SelIndent property, 211–212
SelItalic property, 209–211
SelRightIndent property, 211–212
SelRTF property, 208
SelStrikethru property, 209–211
SelUnderline property, 209–211
Text property, 208–209
TextRTF property, 208–209
replacing text, 221
saving files, 222, 564–565
searching for text, 221
selecting text, 208–209
setting text attributes, 209–215, 216–217, 219–220
RTF files, 222, 223, 1051–1052
RTF text, 198
RThreshold property, 408, 422
RTrim function, 101
Run menu, IDE, 43

S

Save command (multimedia MCI control), 748
Save method, 719
SaveFile method, 222, 564–565
SavePicture function, 566, 620
SavePicture statement, 338
SaveSetting Windows API function, 193–195, 997
SaveToFile method, 898, 929–930
SaveToolbar method, 482
SaveToOle1File method, 898
Saving pictures to disk, 338
Saving RTF files, 222
ScaleHeight property, 133, 338, 607
ScaleLeft property, 133
ScaleMode property
forms, 17, 133, 606–607
picture boxes, 337–338, 606–607
pixel-level manipulation of images, 636
ScaleTop property, 133
ScaleWidth property, 133, 338, 607
Scope, 11, 13, 28, 37, 90–91
Screen
capturing images, 794–799
capturing mouse events outside program window, 789–793
coordinates, translating to window coordinates, 790
device context for entire screen, 781–782
refreshing, 584
Screen object, 590–591, 608, 971–972, 992–993
Scroll bars, 283–284. See also Flat scroll bars.
adding to forms, 286
adding to text boxes, 201–202, 293–294
current value, 289
events
Change event, 289–290
Scroll event, 291–292
large changes, 287
pairs, coordinating, 293
properties
Enabled property, 292
LargeChange property, 287
Min, Max properties, 286–287
SmallChange property, 288
Value property, 289
Visible property, 292
range of values, 286
showing and hiding, 292
small changes, 288
Scroll event, 291–292, 302–303
ScrollBars property, 201, 293–294
Scrolling list boxes horizontally, 263
Search and replace, in RTF boxes, 221
Search button, Web browsers, 705
Secant function, calculating, 114
Second function, 90
Security: password controls, 206
Seek command (multimedia MCI control), 748
Seek property, 873
SelAlignment property, 216–217
SelBold property, 209–211
SelBullet property, 214–215
SelCharOffset property, 219–220
SelColor property, 216–217
Select Case Is keyword, 105
Select Case statement, 105
Selected array, 260
Selected property, 257
SelectObject Windows API function, 190, 786–787
SelectRange property, 303
Self drops, handling, 981–982
SelFontName property, 213
SelFontSize property, 213
SelHangingIndent property, 211–212
SelIndent property, 211–212
SelLength property, 204, 303
SelPrint method, 223–224
SelRightIndent property, 211–212
SelRTF property, 208
SelStart property, 204, 303
SelStrikethru property, 209–211
SelText property, 204
SelUnderline property, 209–211
SEND (FTP command), 730
Send method, 719, 722–723
SendKeys function, 111–112
Sensitive data, protecting, 37
Sequential files, 541–542, 550–552, 554–558
Serial port access, 408, 423, 427
Serialized thread operations, 936
SessionID property, 721, 725
Set procedures, 948
Set statement, 940–942
SetCapture Windows API function, 790–793, 800–802
SetData method, 332, 379, 609, 984
SetFocus method, 234
SetROP2 Windows API function, 789
SetText method, 205
Settings, Windows Registry. See Windows Registry.
Settings property, 408, 423
SetWindowPos Windows API function, 810–812
Sgn function, 113
Shape control, 436–437
adding to forms, 448–449
automatic alignment, turning off, 453
borders, 452
drawing shapes, 449–451
filling shapes, 452–453
hiding and showing shapes, 455
Move method, 454–455
moving shapes at runtime, 454
properties
BorderStyle property, 452
BorderWidth property, 452
FillColor property, 453
FillStyle property, 452
Height property, 454
Left property, 454
Shape property, 449, 450, 451
Top property, 454
Width property, 454
Shape property, 449, 450, 451
Shared files, specifying, 1048
Shell32.dll, 774
Shift key, 112, 303–306, 304
Shortcut keys, 155, 171, 172–173
Show method
dialog box display, 962
forms, 136, 961
MAPIMessages control, 720
modal dialog box display, 147, 996–997
ShowHelp method, 368
Showing and hiding buttons, 237–238
Showing and hiding controls, 132
Showing and hiding IDE windows, 73
Showing and hiding menus and menu items, 184
Showing and hiding multimedia MCI control, 749
Showing and hiding scroll bars, 292
Showing and hiding shapes, 455
ShowInTaskbar property, 995
ShowOpen, ShowSave methods, 350–351
Shrinking OLE objects, 928
SignOff method, 722–723
SignOn method, 721, 725
Simple combo boxes, 265
SimpleText property, 491
Sin function, 113
Single-stepping, 1032
Single-threaded objects, 936
Single variable type, 89
SingleUse value, Instancing property, 937, 960
SIZE (FTP command), 730
Size property, 590
SizeMode property, 903, 905, 928
Sizing controls, 51–52, 131
Sizing handles on controls, 51
Slider control, 284
adding to forms, 296–297
clearing selection, 306
current value, 301–303
events
Change events, 301
handling, 301–303
KeyDown event, 204
Scroll event, 302–303
groove clicks, 298–299
methods
ClearSel method, 306
GetNumTicks method, 299
Move method, 297
orientation, 297
properties
LargeChange property, 298–299
Min, Max properties, 298
Orientation property, 297
SelectRange property, 303
SelLength property, 303
SelStart property, 303
SmallChange property, 299
TickFrequency property, 299–300
TickStyle property, 300
Value property, 301, 302
range of values, 298, 303–306
tick marks, 299–300
tick style, 300
SLN function, 116
Small changes, 288
Small code, optimizing for, 75
Small icons, adding to list views, 522–524
SmallChange property, 288, 299
SmallIcon mode, list views, 519
SMPTE (Society of Motion Picture and Television Engineers) time formats, 746
Software design process, 35–38
Sort property, 401
Sorted property, 258
Sorting combo boxes, 271–272
Sorting flex grid control, 401
Sorting list boxes, 258
Sound command, multimedia MCI control, 748
Source property, 1022
SourceDoc property, 897, 904
Space function, 101
Spacing controls, 51–53
<SPAN> DHTML tag, 710
Span method, 208
Splash screens, 24
Spreadsheet, creating, 393–399
SQL property, 827, 838
SQL statements, executing, 874–875, 883, 893–894
Sqr function, 113
Squares, drawing, 449–450
Src attribute, 710
Src property, 710
Standard arrays, 93–94
Startup forms, 55, 61, 69
Startup objects, 943
Startup position of forms, specifying, 995
Startup procedure, 54
StateChanged event, 727–728, 729
Static keyword
declaring arrays, 93
declaring procedures, 13
declaring subroutines, 96
declaring variables, 86
defined, 11
preserving variable values, 99–100
Status bars, 465–466
adding panels, 485, 490
adding to forms, 126–127, 484
aligning, 485
appearance, customizing, 488
click events, 490
creating using picture boxes, 322
displaying images, 489
displaying status information, 487
displaying text, 486
panel properties
Alignment property, 488
AutoSize property, 488
Bevel property, 488
Key property, 490
Picture property, 489
SimpleText property, 491
Style property, 487
Text property, 486
PanelClick, PanelDblClick events, 490
Panels collection, 485
properties
Align property, 485
Style property, 491
without panels, 491
StatusUpdate event, 741, 750
Step charts, 2D and 3D, 388–390
Step command, multimedia MCI control, 748, 769
Step keyword, 591, 594, 604
SThreshold property, 408, 422
StillExecuting property, 727
Stop button, Web browsers, 705
Stop command, multimedia MCI control, 748, 749, 753
Stop method, 705
Stop statement, 116
Stopwatch example program, 416–417
Str function, 90, 102
StrComp function, 101
StrConv function, 101
Stretch property, 339–340, 618, 633
Stretching images, 333–334, 632–633
StrikeThrough property, 590
Strikethru text in RTF boxes, 209–211
String function, 101
String variable type, 89, 101
Strings
converting between string and numeric values, 102
formatting date and time values, 115
passing as arguments to code components, 951–953
string-handling functions, 101–102
variable-length vs. fixed-length, 101
Style property
buttons, 230, 237, 239–240, 241
combo boxes, 265, 273
images, displaying in controls, 616
list boxes, 264
status bar panels, 487
status bars, 491
toolbar buttons, 474–475, 477, 479
tree views, 511
Sub Main procedure, 54, 943
Sub procedures, 674–678
Submenus, 173–175
Submit button, 712–713
Subnodes, adding to tree views, 513–515
Subroutines, 96–97, 99–100, 775–776
Subscript characters, RTF boxes, 219–220
Suffix symbols, numeric values, 88
Superscript characters, RTF boxes, 219–220
Switch function, 106
SYD function, 116
SyncBuddy property, 307
Syntax Checking, IDE, 71, 72

T

Tab order in text-entry forms, 236
Tab order of controls, 129–130, 236, 975
Tab strips, 504–505
adding tabs, 532–533
adding to forms, 531–532
Click events, 536
connecting images to tabs, 534
displaying correct tab, 536
displaying other controls, 535–536
properties
Caption property, 533
ImageList property, 534
tab captions, 533
Tabs collection, 533
TabIndex property, 130, 236, 975
Table Operation drop-down box, DHTML Page Designer, 715–716
Table Structure window, Visual Data Manager, 831–832
TableDef object, DAO, 859, 860–863
Tables, DHTML pages, 715–716
Tables (database tables). See also Fields.
adding fields to, 860–861
creating, 859
creating using Visual Data Manager, 830
defined, 823
indexes, 861–863
opening, 866–867
TabStop property, 19, 130, 236
Tan function, 113
Target URL, setting, 716–717
Taskbar, Windows 95, 995
Templates folder, Visual Component Manager, 56–57, 176–178
Temporary file names, 1066
Terminate event, 672, 958–959
Terminating programs, 116
Testing ActiveX controls, 655–656, 661–662, 662–664
Testing ActiveX documents, 683, 690–691
Testing code components, 954–956
Testing DHTML pages, 717
Testing programs, 1007–1008
Text
adding to DHTML pages, 709–710
aligning, 200–201, 216–217, 446
customizing IDE, 50–51
determining fonts available, 590–591
displaying in status bars, 486
drawing using Print method, 588–589
entering in flex grid control, 394
Font object, 590
font properties, 589
formatting, 329–330, 445–446, 589, 710
highlighting, turning off, 204
printing, from RTF boxes, 223–224
replacing in text boxes, 204
in RTF boxes, 208–209
searching for in IDE, 74
selecting, 204, 208–209
setting attributes, 209–211
setting color, 216–217
superscripts and subscripts, in RTF boxes, 219–220
in text boxes, 203
title bar text, 121, 802–803
Text boxes. See also Combo boxes.
adding scroll bars, 201–202, 293–294
adding to forms, 198
aligning text, 200–201
binding to data controls, 835, 838–839, 840–841, 847
clipboard, copying and pasting, 204–205
data entry in flex grid control, 397–399
events
Change event, 145, 207
KeyDown event, 207
KeyPress event, 206
KeyUpevent, 207
highlighting, turning on and off, 204
inappropriate use of, 198–199
vs. label controls, 444–445
limiting number of characters, 201
multiline text boxes, 200
password control, 205–206
properties
Alignment property, 200–201
DataField, DataSource properties, 835, 838–839, 840–841
Enabled property, 202
HideSelection property, 204
Locked property, 202
MaxLength property, 201
Multiline property, 200, 201
PasswordChar property, 205–206
ScrollBars property, 201, 293–294
SelLength property, 204
SelStart property, 204
SelText property, 204
Text property, 203
read-only text boxes, 202
replacing text, 204
restricting input characters, 206–207
selecting text, 204
setting text, 203
word wrap, 200
Text data, sending, 425
Text property
combo boxes, 265, 267, 270–271
flex grid control, 393, 394
RTF boxes, 208–209
status bar panels, 486
text boxes, 203
TextArray property, 400
TextHeight method, 589
TextRTF property, 208–209
TextStream objects, 542, 575–579
TextWidth method, 589
Thread-per-object model, 936
Thread pooling, 936
Threading models, 936, 963
Thumb of scroll bars, 283
Tic-tac-toe game (ActiveX document example), 684–689
Tick marks, slider controls, 299–300, 300
TickFrequency property, 299–300
TickStyle property, 300
Time formats, 114–115, 413–415, 746–747
Time function, 115
Time$ function, 413
TimeFormat property, 746, 770
Timer control, 406–407
accuracy of, 413
adding to forms, 412
animation using image list control, 419–421
current time, displaying, 415
elapsed time, displaying, 417
example programs, 415–419
formatting date and time values, 413–415
initializing, 412
properties
Enabled property, 412
Interval property, 412
Timer event, 412, 413
using with progress bar, 492–493
Timer event, 412, 413
TimeSerial function, 90, 115
TimeValue function, 90, 115
Title bar text, 121, 346–347, 802–803
Title bars, 118
Titles for Help pages, 1057–1058
To property, 770
Toggle buttons in toolbars, 477
Tool tips, 45, 238, 1058–1060
Toolbars, 465
adding buttons, 471, 482–484
adding combo boxes, 479–481
adding images to buttons, 475–476
adding to forms, 469
aligning, 470
button groups, 478
button properties
Index property, 471, 475
Key property, 125, 471
Style property, 474–475, 477, 479
ToolTipText property, 481
ButtonClick event, 471–472
Buttons collection, 482–484
check buttons, 477
connecting buttons to menu items, 473
creating using picture boxes, 322
in forms, 119, 123–125–126
handling button clicks, 472
in IDE, 44, 61, 67–69
methods
RestoreToolbar method, 482
SaveToolbar method, 482
properties
Align property, 470
AllowCustomize property, 482
ImageList property, 476
separators, 474–475
tool tips, 481
user customization, 482
Toolbox, DHTML Page Designer, 710–711, 712–713, 716–717
Toolbox, Visual Basic, 48, 664
Tools menu, IDE, 43
ToolTipText property, 238, 439, 481
Top property
buttons, 239
forms, 133
frame control, 440
label control, 443
shape control, 454
ToPage property, 364
TopIndex property, 274–275
Total disk space, determining, 813–814
Trademark information, adding to projects, 59
Transactions, ADO, 854
Transferring files. See FTP (File Transfer Protocol).
Trappable errors
Cancel button, Common Dialogs, 1028–1029
creating error objects, 1026–1027
determining source of error, 1022
determining which error occurred, 1020–1021
disabling error trapping, 1015–1016
disregarding errors, 1015
in DLLs, 1023
list of, 1003–1007
multimedia MCI control, 767–768
nested error handling, 1024–1025
resuming execution, 1016–1020
retrieving error description, 1021–1022
user-defined errors, 1023–1024
using labels, 1012–1013
using line numbers, 1014
writing error handlers, 1009–1012
Tree views, 502
adding images, 515–517
adding to forms, 510–511
events
Collapse event, 517
Expand event, 517
NodeClick event, 518
expanding and collapsing nodes, 517–518
node properties
Expanded property, 518
Image property, 515
Key property, 512
nodes, 511–512
properties, Style property, 511
style, selecting, 511
subnodes, 513–515
Trigonometric functions, 114
Trim function, 101
TwipsPerPixelX property, 608
TwipsPerPixelY property, 608
Type casting. See Converting data between variable types.
Type keyword, 11, 86, 93
Type libraries, code components, 940, 941
Type of control, determining at runtime, 972–973
TypeOf keyword, 972–973
Types. See Variable types.

U

UBound function, 96
Ubound property, 973
UCase function, 90, 101
Underline property, 590
Underlining text in RTF boxes, 209–211
Units of measurement, 17, 53, 133, 328, 337–338, 606–607
Unload statement, 137, 189, 242
Unlocking memory, 808–809
UpClick event, 308–309
Update method, 868–869
Update method, OLE objects, 898
Updated event, 930–931
UpdateInterval property, 750
UpdateRecord method, 845
Updown controls, 284, 307–309
UpDown property, 410, 430
URL property, 1066
URLs, 700–703, 716–717
UseMnemonic property, 447
User controls. See ActiveX controls.
User-defined coordinate systems, 133, 607
User-defined data types, 89
User-defined errors, 1023–1024
User registration, online, 1065–1068
User32.dll, 774
UserName property, 727

V

Val function, 90, 102
Value, passing arguments by, 776
Value property
checkboxes, 245–246
DateTimePicker control, 430
MonthView control, 429
option buttons, 247–248
progress bars, 492
scroll bars, 289
slider controls, 301, 302
Variable-length arrays, 968
Variable-length strings, 101
Variable scope, 11, 37
Variable scope prefixes, 28
Variable type prefixes, 28–29
Variable types, 88–89
C/C++ data type correspondences, 776–778
converting between types, 90, 102
default type, 88
field types, DAO TableDef object, 860
Hungarian prefix notation, 776–777
list of, 7–8
specifying using As keyword, 11
used in Windows API, 778–779
variable prefixes, 28–29
verifying type, 91, 93
Windows-defined data types, 777–778
Variables
commenting conventions, 33–34
declaring, 11, 86–87
implicit declaration, 87
Option Explicit statement, 38, 88
Option Private Module statement, 91
variable scope, 90–91
variable types, 88–89
default initialization, 87
examining values of (debugging), 1033–1036
form-level variables, 91
form-wide variables, 7, 8
global variables, 10, 91
literal suffix symbols, 88
module-level variables, 91
names, misspelling, 38
preserving values, 99–100
procedure-level variables, 91
variable scope, 11, 37, 90–91
variable scope prefixes, 28
variable type, verifying, 91, 93
variable type prefixes, 28–29
variable types, 7–8
viewing definition in IDE, 74
Variant arrays, 951–953
Variant variable type, 38, 88–89, 89
VBD files (ActiveX document specification files), 651, 686, 690–691
VbOLEInPlaceActivate verb, 897
VbOLEOpen verb, 897
VBP files (project files), 15, 25
VBW files (project files), 16
Version control, 39
Version information, 59
Version.dll, 774
Vertical scroll bars, 286. See also Scroll bars.
Vertical Spacing item, Format menu, 52–53
View menu, 43, 73, 165
View modes, list views, 504, 519, 524–525
View property, 524, 525
Visible property
buttons, 237–238
combo boxes, 273
controls, 132
menu items, 184, 188
menus, 184
multimedia MCI control, 749
pop-up menus, 184
scroll bars, 292
Visual Basic
best coding practices, 36–38
commenting conventions, 33–34
editions of, 2
naming conventions, 28–33
project types supported by, 2–3
Visual Basic API Viewer, 779
Visual Basic Application Wizard
adding status bars to forms, 484
adding toolbars to forms, 123–125, 469
designing menus, 157
integrating Web browsers into projects, 691–692
online help system, 1063–1064
profiles, 23
projects, creating, 22–28
Visual Basic color constants, 586–587
Visual Basic Global object, 994
Visual Basic Integrated Development Environment. See IDE (Integrated Development Environment).
Visual Basic Menu Editor. See Menu Editor.
Visual Basic project groups, 662–664
Visual C++ code, 816–818
Visual Component Manager, 56–57, 58, 65–66, 176–178
Visual Data Manager, 830–833

W

Wait property, 771
Watch window, 1034
WAV files, playing, 755–757
Web browser control, 696. See also Web browsers.
events, DownloadComplete event, 701
methods
GoBack method, 704
GoForward method, 704
GoHome method, 701, 705
GoSearch method, 705
Navigate method, 700
Refresh method, 705
Stop method, 705
online help system, 1063–1064
properties, LocationName property, 701, 705
Web browsers. See also Web browser control.
allowing navigation to URLs, 700–703
creating, 696, 699–700
integrating into Visual Basic programs, 691–692
specifying home page, 701
standard buttons, 705
URLs, specifying, 700–703
Web pages. See also ActiveX documents.
DHTML pages, testing, 707, 717
directories, downloading, 731, 732
embedding ActiveX controls in, 657
including Visual Basic code in, 706
Weekday function, 90
Weight property, 590
While loop, 109
Whiteness pen setting, 605
Width property
buttons, 239
forms, 133
frame control, 440
label control, 443
picture boxes, 338, 607
Screen object, 608
shape control, 454
Win32 Software Development Kit (Microsoft), 779
Win32api.txt, 778–779
Window coordinates, translating to screen coordinates, 790
Window handles, 800–802, 811
Window list, adding to menus, 182–183
Window menu, 44, 165, 182–183
WindowFromPoint Windows API function, 800–802
Windowless controls, 990–991
WindowList property, 183
Windows
capturing mouse events outside of, 789–793
device contexts, retrieving, 780
forcing to topmost position, 810–812
hiding, 136
specifying Z-order position, 810–812
title bar text, 121, 802–803
window handles, retrieving, 800–802
Windows, IDE, 73
Windows 95 taskbar, 995
Windows API
core Windows DLLs, 774
sounds, playing, 804–805
Visual Basic API Viewer add-in tool, 779
window handles, retrieving, 800–802
Windows API functions. See also names of specific functions.
calling, 775
correspondences between data types and Visual Basic variable types, 776–778
declarations, adding to Visual Basic programs, 779
declaring, 775–776
Windows applications. See also headings beginning with OLE.
“Designed for Microsoft Windows” logo, 1041–1042
dragging data between applications, 983–990
giving focus to, 112
sending keystrokes to, 110–112
Windows character set, limiting fonts to, 360
Windows Common Controls
coolbars, 466–467, 493–497
displaying images, 616
ImageList property, 508
progress bars, 466–467, 491–493
status bars, 126–127, 465–466, 484–491
toolbars, 125, 322, 465, 469–484
Windows Help, displaying from Common Dialog controls, 368–370. See also Help files.
Windows installation directory, 814–815
Windows Registry
deleting settings, 999
Most Recently Used (MRU) files list, 192–195
registering ActiveX controls, 664
retrieving settings, 192–193, 997–998, 999
storing settings, 193–195, 997
WindowState property, 151
WinHelp Windows API function, 1061–1062
Winmm.dll, 774
With statement, 109
WithEvents keyword, 86, 94
Wizards. See also Visual Basic Application Wizard.
ActiveX Control Interface Wizard, 669, 675, 680
ActiveX Document Migration Wizard, 683
Data Form Wizard, 840, 841–843
Package and Deployment Wizard, 1039, 1043–1048
Property Page Wizard, 680–681
Word wrap in text boxes, 200
WordWrap property, 445
Workspace object, DAO, 825, 857–858
Write # statement, 550–551
Write method, 577
WriteLine method, 577
WriteProperties event, 671–672, 693–694
Writing to binary files, 554
Writing to random access files, 552–553
Writing to sequential files, 550–551

X

X1, X2 properties, 455, 457
XML (Extended Markup Language), 697, 698
Xor Pen pen setting, 604, 605

Y

Y1, Y2 properties, 455, 457
Year function, 90

Z

Z-order position, 810–812, 976
Zooming OLE objects, 928
ZOrder method, 976


Table of Contents


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.