Training
Certifications
Books
Special Offers
Community




 
Upgrading Microsoft® Visual Basic® 6.0 to Microsoft Visual Basic .NET
Author Ed Robinson, Michael Bond, Robert Ian Oliver
Pages 576
Disk 1 Companion CD(s)
Level All Levels
Published 12/18/2001
ISBN 9780735615878
ISBN-10 0-7356-1587-X
Price(USD) $59.99
To see this book's discounted price, select a reseller below.
 

More Information

About the Book
Table of Contents
Sample Chapter
Index
Related Series
Related Books
About the Author

Support: Book & CD

Rate this book
Barnes Noble Amazon Quantum Books

 

Index


Symbols and Numbers
<> (angle brackets), 352
+= (assignment shortcut), 223
-= (assignment shortcut), 223
. and .. directories, 154
= (operator, testing for Null and Empty), 73
( ) (parentheses)
   with function calls, 92
   indicating parameters not to be set, 299
   required on subroutine calls, 37
95 percent automated upgrade, 9-10
100 percent .NET compatibility, 404
100 percent upgrade, 9

A
About box form, 369
About menu item, 371
Abs function, 141-42
abstract base class, 36
abstraction, 66-69
Activator class, 455
active form, 373
ActiveConnection properties, 425-26
ActiveForm object, 372-73
ActiveMDIChild, 373-74
ActiveX ADO Data controls. See ADO Data control
ActiveX components
   designing and testing for target environments, 21
   reusing in Visual Basic .NET applications, 121
   threading of, 29
   types not supported in the Windows Forms environment, 286-87
   using from .NET, 298-303
ActiveX control library, 412
ActiveX control project type, 122
ActiveX controls
   adding dynamically at run time, 334
   compared to Windows Forms controls, 413-16
   copying design-time property settings for, 407-10
   creating in Visual Basic 6, 20
   deleting from forms, 410
   exposing property types to .NET types, 291
   extended property settings supported by Visual Basic 6, 408-9
   extra DLLs generated for, 405
   global use of, 404
   hosting, 173, 286-89
   installing with Visual Basic 6 Setup, 80
   mappings for, 412-13
   no direct .NET replacements for, 286
   outside Visual Basic environments, 286
   placing on a Visual Basic .NET form, 32
   removing dynamically at run time, 334-35
   replacing with Windows Forms controls, 403, 405-6
   subobjects in, 293
   support for, 285-86
   Toolbox references to, 31-32
   types not supported in the Windows Forms environment, 286-87
   upgrade strategy for, 286
   upgrading, 137-40
   using from .NET, 298-303
   in Visual Basic .NET, 177
ActiveX Data Objects. See ADO
ActiveX designers, 289
ActiveX DHTML page projects, 48
ActiveX DLL project types, 122, 365, 366
ActiveX DLLs, 249
ActiveX document projects, 48
ActiveX documents, 170
ActiveX EXE project, 272
ActiveX EXE project types, 122
ActiveX libraries, installing, 80
ActiveX MousePointer property, 295-96
ActiveX MSBind object, 137
ActiveX .NET control, 289
ActiveX object types, conversion functions for common, 295
ActiveX portion of an ActiveX .NET control, 289
ActiveX ProgressBar control, 406
ActiveX types, unique identifiers associated with, 28
ActiveX UpDown control. See UpDown control
ActiveX vs. .NET framework, 19-29
ActiveX wrapper. See Ax wrapper
"Add a delegate for AddressOf" upgrade issue, 163
add-in components for Visual Basic 6, 288-89
Add method
   calling for a ComboBox or ListBox, 201
   calling the ToString method, 202
Add Project from File menu in Visual Basic 6, 94
Add Reference dialog box, 111
Add Web Reference dialog box, 112
AddForm function, 280-81
AddHandler keyword, 36
AddItem method with COM objects, 201-3
"'AddressOf' expression cannot be converted" compiler error, 256-57
AddressOf keyword, 254-57
AddrOfPinnedObject method, 344
ADO (Active Data Objects), 25-26, 63, 417
   versions of, 311
   with XML Web services, 423-25
ADO-based applications, 146-47
ADO classes, closing out, 449
ADO code
   integrating into Visual Basic .NET applications,
421-25
   manipulating data objects, 306
ADO data binding, 63, 288, 316-17
   compared to ADO.NET, 309
   upgrade note about, 170
ADO Data control (ADODC), 137, 413
   control array of, 318
   in place of the Data control, 128
ADO data environment, 307, 315-16
ADO objects, mapping to ADO.NET, 425-29
ADO Recordset. See also Recordsets
   splitting into DataSet and DataReader classes, 419
   substituting SqlDataReader for, 53
ADODB Stream class, 449
ADODB Stream object, 447
ADODC-based data-bound application, 139
ADODC controls. See ADO Data control
ADODC1_MoveComplete event, 311
adoHelper helper class, 327
ADO.NET, 309
   concepts of, 417-21
   consistency with other .NET Framework classes, 418
   data access object model, 53, 63
   data binding, 63
   mapping ADO objects to, 425-29
alias types, 301-2
AlocHGlobal function, 261
alpha blending, 397-98
Alphabetical view in Property Browser, 32
ambiguous types, 27
Anchor property
   setting for a ListBox control, 105
   of the TreeView control, 394
AndAlso keyword, 36
angle brackets (<>), 352
Ansi keyword, 36
ANSI strings, marshaling string parameters as, 259
apartment threading, 29
API Declare statements, 370-71
API functions. See Windows API functions
App object
   concatenating properties in Visual Basic 6, 367
   upgrading properties and methods of, 467-69
App.HelpFile property, 371-72
AppID class, 310
application architecture, 55-57
application form count, decrementing, 280-81
application lifetime, 278
application manifest, 399
application proxies. See COM+ application proxies
application proxy file, 348
"Application will terminate when Sub Main() finishes" upgrade warning, 165
Application Wizard projects, 209
ApplicationAccessControl attribute, 353
ApplicationActivation attribute, 353, 462
Application.Exit function, 280, 282
ApplicationID attribute, 353
ApplicationName attribute, 353
ApplicationQueuing attribute, 353
Application.Run function, 280
Application.Run method, 209
applications
   adding value to upgraded, 385-401
   analyzing with the Upgrade Wizard, 49
   configuring to run Windows XP-style controls,
398-400
   deployment with Windows Forms controls, 405
   finishing in Visual Basic 6 and Visual Basic .NET, 165
   identifying the main form, 279
   integrating ADO code into, 421-25
   leaving in Visual Basic 6, 45-46
   lifetime of, 208
   limitations of upgraded, 400-401
   managing the lifetime of, 279-80
   preparing for the upgrade process, 61-76
   registering manually, 359
   stand-alone, 57
   startup scenarios for, 209
   supporting Web services in existing, 446-51
   termination of, 278
   testing after Upgrade Wizard modification, 49
   upgrade options for, 45-47
   upgrade potential of, 148
   upgrading distributed, 435-64
   upgrading multitiered, 175
   upgrading one piece at a time, 188
   upgrading partially to Visual Basic .NET, 46-47
App.Major object property, 367, 369
App.Minor object property, 367, 369
App.Revision object property, 367, 368, 369
architecture for remoting, 456-61
ArgumentOutOfRange exception, 107
Arial font, 210
arithmetic operators, shortcuts for, 12
array bound checks, 127
array declarations, upgrading Visual Basic 6, 243
"Array may need to have individual elements initialized" upgrade warning, 164
array types in Visual Basic .NET, 242
ArrayIsDynamic parameter with FileGet, 236
arrays
   declaring with As New, 207
   defining in compatibility with Visual Basic .NET, 75
   initializing, 163, 207-8, 247
   listing forms in, 389
   lower bounds of, 164
   nonzero-bound, 301
   ReDim statement with, 164. 236
   zero-bound lower dimension, 39-40
"Arrays can't be declared with New" upgrade warning, 164, 207
"Arrays in structure may need to be initialized" upgrade warn.ing, 164
As Any declarations, 253-54
As Any parameter, 161
As New syntax
   upgrade issues with, 207-8
   in Visual Basic 6, 74, 75
   in Visual Basic .NET, 74-76
"As <variable type> was removed from ReDim statement" upgrade warning, 164
AscB function, 142, 160
.asmx file extension, 440
ASP pages, 56
ASP Web applications, 56
ASP.NET
   debugging applications on a local machine, 184
   pages, 53
   programming model, 440
Aspnet_wp.exe, 184
.aspx files, 440
assemblies, 389
   creating for public interfaces, 456-57
   creating strong names for, 356, 357
   types contained in, 28
Assembly Name, 122
Assembly.CreateInstance method, 389
AssemblyInfo.vb file, 126-27, 352-53
   assembly attributes in, 93
   AssemblyVersion attribute, 369
"Assignment not supported: KeyAscii to a non-zero value" upgrade warning, 167
asynchronous call, 206
Atn function, 141-42
attached debugger, 113
attributes, 12, 352-56
   adding to declare ID attributes, 191, 193
   in AssemblyInfo.vb, 93
   attaching to components, 352
   scopes of, 355
   upgrading Visual Basic 6, 122-27
Auto keyword, 36
AutoComplete attribute, 353, 356, 363
automated upgrade, plan for, 9-10
automatic coercions between types, 17-18
automatic formatting, 18
automatic transaction processing, 349
AutoRedraw property, 329
Ax wrapper, 290
   applying to the TreeView control, 293
   exposing ActiveX properties, 291
   renaming ActiveX properties, 297
Ax wrapper class, 290

B
back-end legacy systems, 57
BackColor property, 20
background
   compilation, 18
   compiler, 16
   erasing in GDI+, 331
   Task List, 16
bad constants, 212-13
"Bad record length"exception, 237
base class instance, 36
base filenames, upgrading two files with the same, 127
Basic programming language, 223
behavior differences between Visual Basic 6 and Visual Basic .NET, 154
bidirectional data transfers, 420
binary compatibility
   controlling for upgraded components, 195
   enabling in Visual Basic .NET classes, 191-95
   ensuring, 187
   turning on in a Visual Basic 6 project, 182-83
   in Visual Basic 6, 189
binary files, 233-34
binary string functions, 142
binding. See data binding
binding collection, 138, 317
bitmap collection editor, 340-41
bitmapCollection property, 340
Break method, 113
break mode, 42-43
breaking compatibility, 6-8, 9
breakpoints, 110
BuddyControl property, 139
build errors, handling, 108-9
Build property in Windows, 369
Button controls, adding to a Windows Forms project, 104, 105
BYOT (bring your own transaction), 349
ByRef
   calling convention, 38
   keyword, 144
   parameters, 172-73, 298-99
ByteArray, assigning to a string, 163
ByVal
   calling convention, 38
   keyword, 144
   parameters, 173
ByValArray attribute, 260, 261
ByValTStr attribute, 261

C
C# language, 16-18
C++ .NET, 46
Calendar statement, 160
callback function, 254
Cancel property for Unload, 162
CancelButton property setting, 133
"Cannot determine array type because it is Nothing" excep.tion, 236
"Can't resolve the name of control" upgrade warning, 164
Caption property, upgrading to Text property, 133, 267
Catch keyword, 37
Category view in Property Browser, 32
CChar keyword, 36
CCW (COM callable wrapper), 178
CD with this book. See companion CD
Char array, 260
Char type, 223
Charset parameter with StructLayout, 259
ChDir statement, 232
ChDrive statement, 232
CheckBox control, 128
CheckBox object, 469-71
child nodes, adding to a TreeView control, 414
Chr function, 241
ChrB function, 160
Circle method, 328
class attributes, 145-46
"Class instancing was changed" upgrade warning, 165
Class keyword, 36
class-level Boolean variable, 276
class modules, 145-46
Class statement, 90
class structure of ADO.NET, 418
classes, implementing, 82
ClassesRoot property of the Registry object, 394
Clear method in GDI+, 331
Click event
   editing, 95-96
   reassociating with the ProgressBar control, 411-12
Click procedure, signature of, 90-91
Click statement, 271
client application, required for remoting, 452
client for the Architecting for Remoting sample, 460-61
client process in the Simple Remoting example, 454-56
client projects, 58
client/server applications
   forms-based, 56-57
   upgrading from Visual Basic 6, 178-81
client-side cursor location, 316
client-side technologies, 5
ClientSize property, 133
Clipboard class in the .NET Framework, 268
Clipboard code, rewriting, 331-33
"Clipboard method was not upgraded" upgrade issue, 332, 375
Clipboard object, 268, 331, 375
Clipboard text, helper methods for getting and setting, 375-76
Close method
   closing registry keys, 394
   releasing physical resources, 205
Close statement, 232
closed environments, 21
Cls method, 328
Cls statement, 271
CObj keyword, 36
code
   behind forms, 144-45
   changes in upgraded, 37-41
   manipulating data objects, 306-7
   preserving during the upgrade process, 118
   size and scope as upgrade factors for an application, 58
   thread-safe, 249-51
   types of conversions, 140-42
   upgrading, 120
   upgrading Visual Basic 6, 140-45
Code Editor in the AddButton_Click method, 105
"Code was upgraded to use <function> which may not have the same behavior" upgrade issue, 163
coding practices, common problematic, 64-76
coercion
   functions, 36
   mapping with, 141
   problems, 172
collapsed code regions, 90
Collect method, 25, 206
collection classes, 170, 219-22
collection enumerator, 163
collections, 162, 299-300
color objects, 226
colors, declaring constants as, 170
ColorTranslator.FromOle method, 226
COM, 271-72, 350
COM attributes
   adding to ensure binary compatibility, 187
   specifying, 195
COM-based systems, 423
COM callable wrapper (CCW), 178
COM clients, communicating with .NET server components, 178
COM components
   applications with a dependency on, 47
   creating in Visual Basic 6, 178-79, 189
   .NET clients communicating with, 177
   with no .NET equivalent, 176
   reference counting in, 203-4
   removing prior to XCopy deployment, 401
   serializing to an intrinsic data type, 446-47
   from Visual Basic .NET, 58
"COM expression not supported: Module methods of COM objects" upgrade issue, 161, 303
COM GUIDs, 194
COM interop, 121, 175
   compared to COM+ services, 349-50
   registering a component for, 186
   when to use, 177-78
   upgrading applications one piece at a time, 188
   in Visual Studio .NET, 176
COM interop layer, 46, 47
COM objects
   errors ignored during upgrade in events raised by, 312
   lifetimes in Visual Basic 6, 204
   wrapping an XML service around existing, 446-47
COM references, 111
COM server, creating a .NET client to talk to, 180-81
COM Transaction Integrator (COMTI), 349
COM+
   attributes specific to, 353-54
   compared to COM, 350
   in distributed applications, 461
   requirements in Visual Basic .NET, 350-51
   settings, 356
COM+ application proxies, 440, 461-64
COM+ applications, 347-48
   registering, 358-59
   remoting and, 461
   removing, 359
COM+ classes
   sample with attributes, 354-55
   structure of, 351
COM+ components, 360-63
COM+ services, 348-50
ComboBox
   for the Northwind Database Viewer application, 451
   upgrading, 128
   upgrading properties, methods, and events of, 472-74
"ComboBox property was not upgraded" design error, 168
"ComboBox property was not upgraded" upgrade issue, 162
COMException, 296, 299
Comic Sans MS font, 210
command-line arguments, 122-23
command-line debugger, 113-14
command-line upgrade tool, 99-100
Command object, 418, 425
CommandButton, 128, 475-77
comments
   embedding in C#, 17
   preserving, 118
Common Dialog ActiveX control, 413
common framework for all .NET languages, 6
common language runtime, 21
   code running under, 46
   default properties no longer supported, 199
companion CD
   Architecting for Remoting sample, 457
   Bind OLE Picture application, 327
   COMPlusClass project, 358
   DefaultProperties sample, 200
   DynamicApp.sln sample application, 385-401
   examples in Chapter 14, 305
   FileReadAndWrite.sln, 390
   FontTest sample application, 210
   FormCollectionClass.vb file, 335
   Graphics Features project, 394
   LateBinding Performance project, 207
   ListBoxExample sample, 202
   MyButton.vbp project, 131
   Northwind.mdb, 435
   OLEDragAndDrop sample application, 214, 217
   PBar sample Visual Basic 6 application, 406-7
   PrintForm application, 338
   prjADOEvent, 311
   prjADORuntime, 318
   prjFirstUpgrade project, 80
   Registry Features project, 392
   sample applications on, 199
   Simple Remoting example, 453
   Simple Web Service sample, 441
   SimpleTransaction, 360-61
   SOAP Services example, 462
   TranslatorClient, 178, 179
   TranslatorServer, 178, 179
   Web Services and ADODB sample, 448
   XPTheme sample, 398
compatibility
   with COM clients, 194
   reasons for breaking, 6-8
compatibility library, 119
   functions provided by, 142
   MSBind .NET class in, 137
   support for control arrays, 135
Compensating Resource Manager, 349
compilation, background, 18
compilation errors
   flagging in real time, 16
   reporting of, 109
compile errors, upgrade issues warning of, 152
Compile tab of a Project Properties dialog box, 182
compile-time validation
   lost by reliance on the Variant type, 64, 65
   provided by early binding, 207
compiler
   background, 16
   binding of objects and methods, 69
   errors compared to run-time errors, 296
   upgrading Visual Basic 6 settings, 127
compiling Visual Basic .NET compared to Visual Basic 6, 106
complete upgrade to Visual Basic .NET, 47
complex binding, 316
complex expressions, simplifying, 114-15
COMPlusClass project, 358
Component Services MMC, 359
component tray, 85
ComponentAccessControl attribute, 353
componentization of an application, 439
components
   attaching attributes to, 352-53
   no direct replacement of Visual Basic 6 by .NET, 190
   sharing in closed environments, 21
   upgrading one at a time, 175-76
COMTIIntrinsics attribute, 353
conditional compilation constant settings, 123-24
conditional compilation statements
   maintaining after an upgrade, 224
   upgrading, 171
Configuration Properties folder, 124
conn reference, setting to Nothing in Visual Basic 6 vs. .NET, 205
Connection object, 418, 425-26
connection pool
   getting connections from, 432
   increasing churn in, 433
connections, 432-33. See also database connection
"Constant expression is required" compiler error, 225
constant values, defining, 226, 227
"Constant was not upgraded" upgrade issue, 161
constants
   declaring as colors, 170
   defining to represent a property, 224
   proper usage of, 67
   upgrading, 161
   in Visual Basic 6, 66
construction
   not supported by COM objects in Visual Basic 6, 76
   in Visual Basic .NET, 75-76
ConstructionEnabled attribute, 353, 355
constructors
   calling, 76
   defining for user-defined types, 246
container controls, 287
Context parameter of MsgBox and InputBox, 167
context-sensitive Help, reimplementing in Visual Basic .NET, 371, 372
context sharing, enabling between COM+ and .NET Frame.work classes, 351
control anchoring, 14, 394
control array classes, 135
"Control array element 1 doesn't exist" error, 275
control arrays, 135-36, 318
control flow, 227-32
"Control was not upgraded" design error, 167
controls
   adding dynamically at run time, 333
   adding to a Windows Forms project, 104-5
   adjusting the size of, 394
   benefits of upgrading ActiveX to Windows Forms, 404-5
   binding to a database image, 327-28
   binding to ADO objects, 316
   displaying all associated properties and methods, 410-11
   explicit declaration and allocation of, 133
   global use of, 404
   indexing, 334
   with no subobjects, 414
   normal compared to Windows XP, 400
   removing by name in Windows Forms, 334
   removing dynamically at run time, 333
   replacing ActiveX with Windows Forms, 405-6
   resolving the name of, 164
   returning complex structures, 414
   setting properties for, 104-5
   support for OLE drag and drop in Visual Basic 6, 214
   upgrading manually, 406-12
controls collection, 333-35
Controls.Add, 32
conversion, performing a narrowing, 89
conversion functions
   adding after an upgrade, 141
   for common ActiveX object types, 295
conversion helper functions, listing of, 294-95
Cooper, Alan, 265
copy function, replacing an LSet statement, 248
CopyMemory Windows API function, 261-63
CopyTo method, 161
CorDbg, 113-14
Cos function, 141-42
"Could not find file" global warning, 169
"Could not load referenced component" global warning, 169
"Couldn't resolve default property of object" upgrade warn.ing, 166
Courier font, 210
Courier New font, 210
Create Symbolic Debug Info check box, 182
CreateInstance method, 244-45, 389
CreateSubKey method, 393
cross-language interoperability, 15-16
cryptographic key pair, 357
CrystalReports package, 147
CShort keyword, 36
CtlRefresh method, 411
CType keyword, 36
Currency data type, 8, 223
current class instance, 36
CurrentConfig property of the Registry object, 394
CurrentUser property, 393
CurrentX statement, 271
cursor, 316
Cursor object, assigning to a numeric type, 296
CursorToIPicture conversion function, 295
custom mouse pointers, 163
custom property editors, 342
custom tokens, 109-10
Customize Toolbox component picker, 326
CVErr function, 160

D
DAO (Data Access Objects), 25-26, 63, 310
DAO data binding, 63, 307, 308
DAO Data control, 308
DAO-related elements, 147
DAODBEngine_definst variable, 310-11
dashboard in DynamicApp, 386
data
   creating multiple views of, 429-30
   synchronizing access to, 251
data access
   code, 310-15
   forms, 378-79
   models, 25
   technologies, 63, 305-21
   in Visual Basic, 306-8
Data Access Objects. See DAO
data binding, 69, 307, 430-31. See also ADO data binding; DAO data binding; early binding; late binding RDO data binding
   adding and removing, 138-39
   with ADO.NET data sources, 422
   changing DAO and RDO to ADO, 147
   with code, 378
   to a control, 430
   with a data class, 378-79
   forcing, 431
   with Web Forms controls, 431
data binding properties, setting at run time, 318-20
Data control, 128, 134
data environments, 315
data forms, 367
data object model of ADO.NET, 417
data persistence, .NET Framework vs. ActiveX, 146
data repositories, creating different forms of, 428-29
data types, 238-49
   standardizing across languages, 6
   upgrading based on size, 234
   upgrading to fit, 143-44
DataAdapter, 420, 428
database class in the Architecting for Remoting sample, 457- 59
database connection, 313-14. See also connections
database images, binding controls to, 327-28
DataBind, calling on the Web Form DataGrid, 431
DataEnvironment class, 147
DataEnvironment designer, 147, 289
DataField property
   controlling simple binding, 317
   of a TextBox control, 137, 138
DataFormat property, controlling simple binding, 317
DataGrid control
   binding an ADO Recordset to, 422, 423
   mapping to Visual Basic .NET, 413
DataMember property, controlling simple binding, 317
DataReader class, 419
DataReader object, 427, 428
DataRelation class, 419
DataReport designer, 147
DataReport Writer, 289
DataSet class, 419, 420
DataSets, 419, 428, 429, 431
DataSource interface, 146
DataSource property
   controlling simple binding, 317
   not supported by Visual Basic .NET controls, 378, 379
   of the QueryDataGrid, 450
   of a TextBox control, 137, 138
DataSourceBehavior property, 146
DataTable class, 419
DataTables, 309
   converting Recordsets to, 422
   data binding with, 430
   specifying relationships between, 419
DataViews, 429-30
Date data type, 67
date editor, 342
Date object, 68
DbgCLR, 114
DBGrid control, 288
DBNull.Value, 240
DDE (Dynamic Data Exchange), 271-73
DDE communication, replacing with COM, 272
DDE helper class, 272
DDE-related API functions, 273
debugger, changes in Visual Basic .NET, 42-43
Debugger Users group, 184
DebuggerHidden attribute, 12
debugging
   problem-solving techniques, 112-15
   between a Visual Basic 6 client and .NET server,
187-88
   in Visual Basic .NET, 107-8
   between Visual Basic .NET clients and Visual Basic server, 182-84
Debugging property, 123
Decimal data type, 8, 223
"Declaration type not supported" upgrade issue, 161, 243
Declare statements
   creating for SendMessage in Visual Basic 6, 253
   creating Windows API functions, 252
   declaring multiple for the SendMessage function, 253-54
   upgrading Integer and Long parameters, 252
"Declaring a parameter As Any is not supported" upgrade issue, 161
deep object model, 414
"Def statement was removed" upgrade note, 170
Default design-time property setting, 133
default font in Visual Basic 6, 210
default form, 277
default form instance, 277-78
default instances as a solution for module methods, 310
Default keyword, 36
default properties
   eliminating the use of, 203
   no longer supported in the common language runtime, 199-201
   resolving, 92
   run-time differences from, 201-3
   stating explicitly, 199-201
   support of implicit, 202
   Visual Basic 6 compared to .NET, 7
DefaultProperties sample, 200
defaults for Option statements, 89
DefInstance property, 277, 278
DefInstance shared method, 278
DefInt, 62
DefType statement, 143
delegate declaration, 257
Delegate keyword, 36, 257
delegate type, 254
DeleteSubKeyTree method, 393
DeleteValue method, 394
dependency hierarchy, 58, 94
deployment with Windows Forms controls, 405
deprecated features, removing, 62-63
Description attribute, 353
design errors
   listing in an upgrade report, 156
   listing of, 167-69
design issues, 154
design-time licenses, 169
design-time property settings, 407-10
design-time settings, 134
design view, forms in, 266
designers, 147
destination directory, specifying in Upgrade Wizard, 83-84
deterministic finalization, 204
deterministic lifespan of a variable, 22
deterministic memory-management scheme, 205
development environment
   improvements in, 15-16
   Visual Basic 6 vs. Visual Basic .NET, 4, 29-34
Devenv.exe, 29
DHTML designer, 289
DHTML pages, 5
DHTMLReport WebClass designer, 147
Dim...As New statements, 207-8
Dir function
   . and .. directories not returned by, 165
   marking with an upgrade warning, 154
Dir$ function, calling in Visual Basic 6, 387
Dir method, warning about, 369
DirectCast keyword, 36
directories, reading the contents of, 387-88
directory name, returning from a file path, 388
DirListBox, 128, 477-79
disconnected Recordsets, 447
   mapping to DataSets, 419
   retrieving, 428-29
Dispose event, 316
Dispose method, 24
   calling, 24, 315
   destroying graphics objects, 398
distributed applications
   definition of, 436
   upgrading, 435-64
distributed technologies, 440
DLL/Custom Control Library option, 82
DLL-exported functions, 302
DLL projects
   adding in Visual Basic 6, 94
   upgrading, 82
DLLs
   conflicts during installation of Visual Basic 6 applications, 401
   eliminating conflicts, 358
   finding all forms in, 388-89
   loading dynamically, 389
"DoEvents does not return a value" upgrade issue,
160-61
Donut Shape check box, 396
DoTasks method, 363
Double value, Date data type implemented as, 67-68
drag-and-drop operations. See also OLE drag and drop; Visual Basic drag and drop
   in Visual Basic 6, 213-15
   in Visual Basic .NET, 215-19
DragDrop event for a form or control, 273
drawing, 268
drawing code, 270
DrawMode statement, 271
DrawString method, 331
DrawStyle statement, 271
DrawWidth statement, 271
DriveListBox, 128, 479-81
DTPicker ActiveX control, 413
dummy form, creating for ActiveX controls, 334
dynamic arrays, 234, 235
dynamic cursors, 428
Dynamic Data Exchange. See DDE
dynamic data types, 234
dynamic properties, 390-92
dynamic registration, 358-59
DynamicApp sample application, 385, 386-87

E
early binding, 69
   advantage of always using, 201
   compared to late, 207
   forcing, 206-7
Edit And Continue, not yet available in Visual Basic .NET, 107
embedded objects, 324
Empty keyword, 63, 73
empty strings
   replacing all instances of App.HelpFile with, 372
   substituting for Null values, 314
Enabled property, enabling the timer, 167
Enter event, 267
enterprise architecture with legacy or distributed systems, 57
enumerations, 212
enumerator members, defining as constant types, 226
EnumWindows API function, 254
Eqv, 62
Erase statement, 171
error-handling block, 11
error trapping, adding to events, 313
errors
   in events, 311-13
   obtuse, 114
   reducing, 13
   undetected by Upgrade Wizard, 172-74
errors, warnings, and issues. See EWIs
event code
   updating in a Windows Forms control, 411
   upgraded, 90-92
event firing differences, 274-76
event handlers, 36
"Event may fire when form is initialized" upgrade warning, 166, 275, 276
event name collisions, 297
"Event parameter was not upgraded" upgrade issue, 162
event parameters, 39
"Event was not upgraded" upgrade warning, 165
EventArgs object, 39
eventArgs parameter, 90-91
EventClass attribute, 354
events
   associated by name in Visual Basic 6, 38
   changing to procedures, 171
   declaring public in a separate event interface, 191, 192, 193
   design error for new behavior, 167-68
   errors in, 311-13
   firing as components are initialized, 166
   mapping the upgrade of individual by object,
467-515
   not supported for forms, 268-69
   passing in Visual Basic .NET, 90-91
   renamed for forms, 267
   Visual Basic 6 vs. Visual Basic .NET, 38
eventSender parameter, 90
EventTrackingEnabled attribute, 354
EWIs, 151
   listing of, 160-71
   types of, 152-55
   working with, 159
Excel, loading upgrade report issues into, 157-58
exception handling, 11
ExceptionClass attribute, 354
exceptions
   generated by an upgraded project, 86
   requiring type conversions, 295-96
EXE projects, 82
EXE Server projects, 82
Execute method of the ADO Command object, 426
ExecuteNonQuery method, 426
ExecuteReader method, 426
ExecuteScalar method, 426
ExecuteXmlReader method, 426
execution path, upgrading the code in, 224
explicit code, 92
explicit conversions, 141
explicit declaration and allocation of controls, 133
explicit dereferencing, 204
explicit types, Upgrade Wizard and, 64
explicit variable declaration, 65, 76
export package, 463-64
expression shortcuts, 12
expressions, simplifying complex, 114-15
extended design-time settings for ActiveX controls, 407
extended PMEs, 289
extended property settings, 407-9
extensibility interfaces, 289

F
Fade In button, 395
fade out feature for forms, 88
fat-client systems, 56-57
features
   added in Visual Basic .NET, 6, 223
   graphics-related, 394-98
   handled by the Upgrade Wizard but not recommended for use, 62
   in the IDE, 15-16
   not handled by the Upgrade Wizard, 63
   out-of-date, 269
   remoting, 452
   unique in Visual Basic .NET, 17-18
file format compatibility of Visual Basic and .NET files, 233
file functions, 232-37
   mapping from Visual Basic 6 to Visual Basic .NET, 232
   new in Visual Basic .NET, 387-92
file handles, closing, 23
file path, 388
file printing, full-line vs. partial-line, 233
file statements, 232
FileClose function, 232
FileCopy statement, 232
FileGet function, 232, 237
FileGet statement, 236
FileListBox control, 129
FileListBox object, 481-83
filenames
   returning an array of, 387
   returning from file paths, 388
FileOpen function, 232
FilePut function, 232
FileReadAndWrite sample application, 389-90
files
   not finding during an upgrade, 169
   opening for writing, 390
   reading and writing Visual Basic 6 in .NET, 233
   reading from and writing to, 389-90
   renaming with internal names, 127-28
FileWidth function, 232
FillColor statement, 271
FillStyle statement, 271
Finalize event, 316
Finally keyword, 37
firehose Recordsets, 419, 427-28
fix time, estimating, 157-58
fixed-length array declarations, 246
fixed-length arrays, 234
fixed-length strings
   not supported in Visual Basic .NET, 40, 223
   reading from random-access files, 237
   supporting, 259-60
   upgrading in structures, 261
fixed-size arrays
   declaring variables of a type containing, 153
   defining structures with, 164
FixedLengthString class, 260, 261
FixedSys font, 210
flat-model ActiveX controls, 414
flat object model, 414
FlatStyle property, 399
floodgate effect, 8
Focus event, 267
Font events, 165
Font property, 291
Font types, converting, 295
fonts
   supported in Windows Forms, 168-69
   types of, 209
   upgrading from Visual Basic 6, 210
FontTest sample application, 210, 211
FontToIFont conversion function, 295
ForeColor property, 294
form background, fading from black to white, 330
form designer in Ruby, 265
form fade out, 88
"Form method was not upgraded" upgrade issue, 328
Form object, 484-87
Form Opacity check box, 395
"Form property <formname>ScaleMode is not supported" upgrade issue, 162
Form.BorderStyle, 171
FormCollectionClass.vb file, 335-36
Form.Load event, 274
Form.Paint event, 329
Form_Resize event, 394
forms, 274
   adding WebBrowser controls to, 326
   in any type of .NET project, 34
   changing the regions of, 396-97
   changing the shape of, 396-97
   code behind, 144-45
   creating instances of, 389
   differences between Visual Basic 6 and Visual Basic .NET, 274-83
   fading in, 395
   finding all in a DLL, 388-89
   higher number of issues with, 159
   identifying differences in the design of, 154
   listing in an array, 389
   loading dynamically, 389
   making semitransparent, 14
   opening from Sub Main, 209
   printing, 337-40
   returning the number of open, 160-61
   as startup objects, 209
   upgrading, 120, 128-30, 266
forms-based client/server applications, 56-57
forms collection
   considering the need for, 337
   in frmMain_Closed, 374-75
   implementing in Visual Basic .NET, 335-37
   upgrade issue generated by, 161
   upgrading, 335-37
"Forms collection was not upgraded" upgrade issue, 335
forms development systems, 14
forms packages, 34-35, 265
Forms3, 35
forward-only Recordsets, 427-28, 449
Frame control, 129
Frame object, 488-89
Framework SDK, debuggers included with, 113, 114
.frm file, 130-31, 132, 133
frmAbout form, 366, 369
frmBrowser form, 366, 378
frmDocument form, 367
frmLogin form, 366, 370
frmMain form, 366, 371-72
frmOptions form, 367
frmSplash form, 366, 376-77
fromMain_Closed, renaming Form_Unload to, 374
function calls, processing overhead of, 437
"function is not supported" upgrade issue, 160
function parameters, declaring as delegate types, 254
functional tiers of an application, 439
functions
   commenting out noncritical, 159
   with different behaviors in Visual Basic .NET, 165
   exposing as Web services, 189
   mapping to equivalent, 141-42, 515-20
   null-propagating, 241
   overloading, 12
   parentheses required with, 92
fusion, 358

G
garbage-collected variables and objects, 4
garbage collection, 203-5
   forcing, 25, 205-6
   freeing the developer from memory-management issues, 205
Garbage Collector (GC), 22
Garbage Collector-managed memory, 261
Garbage Collector method, 344
GCHandle structure, 261
GCHandle.Alloc, 262
GCHandle.Alloc method, 344
GDI+, 331
   graphics drawing surface, 398
   graphics object, 329
   object library, 328, 331
   in Windows Forms, 14
Generate Default Interfaces For All Public Classes option, 82
generic objects, 206-7
generic System.Array type, 301
Get statement, 232
GetActiveMdiChild property, 373
GetComInterfaceForObject function, 261
GetEnumerator method, 220, 221, 222
getImageFromForm method, 338
GetOcx, 296
GetType keyword, 36
gizmos, 265
global binding variable, 320
global default instance variable, 310
global error handler, 11
global form count, 280-81
Global Issues in the upgrade report, 156
global multiuse class attribute, 146
global objects, 145, 268
global project setting, 123
global single use class attribute, 146
global use of controls, 404
global warnings, 155, 169-70
GoSub statement
   fixing, 160
   not supported in Visual Basic .NET, 227
   performing a suboperation reusing local variable values, 228
   replacing with ShowDetail, 228-29
   upgrading, 228
GoSub...Return statement, 63, 223, 227-29
GotFocus event, 267
GoTo, 62
graphics
   new features, 394-98
   Visual Basic 6 compared to Visual Basic .NET, 270-71
   Visual Basic 6 properties and methods related to, 268
Graphics Effects form in the Graphics Features project, 394
graphics methods
   on forms in Visual Basic 6, 270
   upgrading, 328-31
graphics objects, 398
group file, 85
GUI debuggers, 114
GUIDs, 194

H
handle, obtaining, 261
Handles clause, 38
Handles keyword, 36, 91
HatchBrush class, 271
HatchStyle enumeration, 271
HDC statement, 271
header information in random-access binary files, 234
Height property, 268
help
   creating for Visual Basic .NET applications, 125
   displaying with Windows forms, 371-72
help context ID, 125
help settings, 125
Help topic for the Timer Interval property, 87
HelpFile parameter of MsgBox and InputBox, 167
Hex function, null propagation and, 241
HKEY_CURRENT_USER registry hive, 393
host process
   required for remoting, 452
   in the Simple Remoting example, 453, 454
HScrollBar, 129, 490-91
HTTP protocol, 452
human-readable language, 17
human-readable names, associated with type identifiers, 28

I
IconToIPicture conversion function, 295
ID attributes, 191, 193
IDE (Integrated Development Environment), 29
   new features in, 15-16
   redesign of, 4
   for Visual Basic .NET, 101-2
IDispatch interface, testing for, 161
IDisposable interface, 24
"#If #EndIf block was not upgraded" upgrade note, 171
#If...#End If precompiler statements, 224
IFontToFont conversion function, 295
#If...Then conditional statements, 123
#If...Then directives, 118
Image control, 129
Image object
   converting to an IPictureDisp, 293
   upgrading properties, methods, and events of, 491-93
Image statement, 271
ImageList ActiveX control, mapping, 413
images, binding controls to, 327-28
ImageToIPicture conversion function, 295
ImageToIPictureDisp compatibility library function, 293
ImageToIPictureDisp conversion function, 295
IMEStatus function, 160
Imp, 62
implementation data types, 67-68
implementation inheritance, 10
Implements keyword, 82
implicit default properties, 202
implicit instantiation, 208
implicit object instantiation, 74-76
implicit variable declaration, 65
Imports keyword, 36
Imports statement, 27
in category for upgrading, 148
in-process method invocation, 437
inconsistent features in Visual Basic 6, 7
indeterministic lifespan of a variable, 22
index values, 416
indexed property declarations, attribute for, 36
indirect approach for creating Visual Basic .NET components, 190
indirect replacement model, 190-91
inheritance, 10-11, 52, 223
Inherits keyword, 10-11, 36
Inherits statement, 223
Initialize event, 316
Initialize method
   calling, 153-54, 163
   inserting within a structure, 246-47
"'Initialize' must be called to initialize instances of this struc.ture" upgrade issue, 163
InitializeComponent subroutine
   copying property settings to, 410
   mapping Visual Basic 6 design-time settings to, 131, 132, 133
   of an upgraded form file, 408-9
INorthwindDatabase interface in the Architecting for Remot.ing sample, 457
Input # statement, mapping to Input function, 232
Insert Breakpoint from the shortcut menu, 110
instantiation by remote applications, 348
instrumentation of release builds, 113
Int32 value, converting to a UInt32 value, 294
Integer data type, 91
Integer numeric type, 252
Integer type, changing to the delegate type, 257
integer values, representing enumerations, 212
Integer variable
   storage size for, 143
   upgrading to Short, 143, 144
   Visual Basic 6 vs. Visual Basic .NET, 233
integrated development environment. See IDE
interface inheritance, 10, 11
Interface keyword, 11, 36
InterfaceQueuing attribute, 354
interfaces, 456, 457
interfaces assembly, 456-57
internal data binding manager objects, 288
internal name, renaming files with, 127-28
internationalization, 15
interoperability upgrade option, 47
interoperation among COM components, 177
Interval property, setting to zero, 167
IntPtr, 262
intrinsic controls, mapping Visual Basic 6 to Windows Forms, 128-30
invalid file format, 169
"Invalid picture" error, 293
InvalidCastException, 200, 296
IPictureDisp ActiveX type, 293
IPictureDispToImage conversion function, 295
IPictureToImage conversion function, 295
IsDBNull, upgrading IsNull to, 165
IsEmpty function, 73, 140-41
ISerializable interface, 442
ISimpleFrame interface, 139
IsMdiContainer property, 282
IsMissing function, upgrading to IsNothing, 238-40
"IsMissing was changed to IsNothing" upgrade note, 171
IsNothing function
   replacing IsMissing, 171
   upgrading, 140-41
   upgrading IsMissing to, 239
IsNull function, 73, 165
IsObject function, 140-41, 165
IsReference function, 165
issues, loading into a spreadsheet, 157-58
ItemData property, 168
iteration in disconnected Recordsets vs. DataSets, 429
IVBGetControl interface, 288

J
just-in-time activation, 349
JustInTimeActivation attribute, 354

K
key file, 357
key pair files, 357
KeyAscii keypress parameter, 167
keywords, added to Visual Basic .NET, 35-37
Kill statement, mapping, 232

L
Label control, 129
Label object, 493-95
Language property of a form, 15
language-related upgrade issues, 224-37
language statements, 232
languages
   common environment shared by, 21-22
   in the Visual Studio .NET IDE, 29-30
large-scale distributed applications, core concepts behind, 435-39
late binding, 17, 69, 70-72
   compared to early, 207
   disadvantage of, 201
   forcing, 206-7
   prohibiting, 13
late-bound variables
   setting to a value, 166
   upgrading properties of, 149-50
LateBinding Performance project, 207
LateBoundCopy method, 200, 201
layout and design-time property settings, 130-34
LayoutKind parameter, 259
LBound, 242
LCase function, 241-42
Leave event, 267
Left function, null propagation and, 241
Left property, setting with Location, 267-68
Left$ function with Null, 73
LeftB function, 142
legacy applications, upgrade scenario, 47
legacy code, cleaning up, 62-63
legacy systems, upgrading back-end, 57
library applications, 348
life cycle
   of applications, 208
   managing for applications, 279-80
   of MDI form applications, 282
   of OLE drag-and-drop operations, 215-16
   of the Simple Remoting example, 454
   of the startup form, 279
Line control, 129
"line couldn't be parsed" global warning, 170
Line Input # statement, 232
Line method, 328
Line object, 495-96
Line statement, 271
lines, drawing in Visual Basic .NET, 329
linked objects, 324
ListBox
   adding the contents of a TextBox control to, 202-3
   adding to a Windows Forms project, 104, 105
   upgrading, 129
   upgrading properties, methods, and events of, 496-99
"ListBox|ComboBox property <control>.NewIndex was not upgraded" upgrade issue, 162
"ListBox|ComboBox was not upgraded" design error, 168
ListBoxExample sample, 202
ListView ActiveX control, 413
ListView Columns property, 33
ListView ListItems subobject, 299
Load event
   upgrade events firing before, 276
   Visual Basic .NET events that can occur before, 274
Load <formname> statement, 160
"Load statement is not supported" upgrade issue, 377
LoadBalancingSupported attribute, 354
LoadResStrings function, 163
LoadResStrings method, 379-81
"LoadResStrings method may need to be replaced" upgrade warning, 163
LoadUpgradeReport code, 158
Localizable property of a form, 15
LocalMachine property of the Registry object, 394
Location property
   mapping Left and Top settings to, 133
   setting, 267-68
Lock statement, mapping, 232
Log method, 113
logical separation of code, 439
login dialog box, adding to an application, 370
Long numeric type, 252
Long variable
   storage size for, 143
   upgrading to Integer, 143, 144
   Visual Basic 6 vs. Visual Basic .NET, 233
loosely coupled applications, 423, 436
loosely coupled events, 349
LostFocus event, 267
"Lower bound of array was changed to 0" upgrade warning, 164, 242
lower bounds, specifying for arrays, 242
"LSet cannot assign one type to another" upgrade issue, 161, 248
LSet statement, 63, 247-49


Next



Last Updated: November 28, 2001
Top of Page