index [ptgmedia.pearsoncmg.com]ptgmedia.pearsoncmg.com/images/0321174046/index/yaoindex.pdf ·...

43
1337 Index A Accelerators, 1314 Activation events, keyboard input, 355–356 Active Server Pages (ASP), 1321. See also ASP.NET ActiveSync, 949–960 APIs, 958 auto-start notification method, 1015–1016 backup and restore, 955 building ActiveSync applications in RAPI, 962 callback notification method, 1016–1023 compared with Web Services, 957–958 defined, 1322 device connection detection, 1015 Emulator and, 954 functions of, 949–951 limitations of, 953–956 managed code applications and, 959–960 partner and guest devices, 951–953 Pass Through, 950 Pocket PCs and, 1187 programming interfaces, 958 sample programs, 952 SQL Server 2000 CE Edition and, 910 Windows CE devices and, 950–951 ActiveX, 5 ActiveX Template Library (ATL), 15 AddHandler method, 388 ADO.NET classes, 70–71, 802 connected vs. disconnected approaches, 800–801 data providers, 71–72 data sets. See DataSet control defined, 1322 error handling, 807–808 layered approach, 798–801 memory-resident databases, 795–796 namespace and assembly references, 802–805 .NET Compact Framework and, 70–72, 800 provider-independent classes, 799, 802 provider-specific classes, 799, 802 RDA programming class, 920–921 storage types supported, 796–797 supersets and subsets in, 805–806 utility routines, 808 Adobe Postscript, 1184–1185 Yao_VB.book.fm Page 1337 Friday, May 21, 2004 10:40 AM

Upload: others

Post on 09-Jul-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Index [ptgmedia.pearsoncmg.com]ptgmedia.pearsoncmg.com/images/0321174046/index/yaoindex.pdf · Connected approach, ADO.NET, 800–801 Connections database connectivity, 910–912

1337

Index

AAccelerators, 1314Activation events, keyboard input,

355–356Active Server Pages (ASP), 1321. See also

ASP.NETActiveSync, 949–960

APIs, 958auto-start notification method,

1015–1016backup and restore, 955building ActiveSync applications in

RAPI, 962callback notification method, 1016–1023compared with Web Services, 957–958defined, 1322device connection detection, 1015Emulator and, 954functions of, 949–951limitations of, 953–956managed code applications and, 959–960partner and guest devices, 951–953Pass Through, 950Pocket PCs and, 1187programming interfaces, 958sample programs, 952

SQL Server 2000 CE Edition and, 910Windows CE devices and, 950–951

ActiveX, 5ActiveX Template Library (ATL), 15AddHandler method, 388ADO.NET

classes, 70–71, 802connected vs. disconnected approaches,

800–801data providers, 71–72data sets. See DataSet controldefined, 1322error handling, 807–808layered approach, 798–801memory-resident databases, 795–796namespace and assembly references,

802–805.NET Compact Framework and, 70–72,

800provider-independent classes, 799, 802provider-specific classes, 799, 802RDA programming class, 920–921storage types supported, 796–797supersets and subsets in, 805–806utility routines, 808

Adobe Postscript, 1184–1185

Yao_VB.book.fm Page 1337 Friday, May 21, 2004 10:40 AM

Page 2: Index [ptgmedia.pearsoncmg.com]ptgmedia.pearsoncmg.com/images/0321174046/index/yaoindex.pdf · Connected approach, ADO.NET, 800–801 Connections database connectivity, 910–912

INDEX1338

Advise Sink, 1016, 1022, 1322Alignment of text

overview of, 1158–1159TextAlign sample program, 1159–1165

Allocated object maps, 173, 1322Allocation functions, Windows API,

1313–1320Alpha values, 1068, 1071, 1322Ambient properties, 295, 1125American National Standards Institute

(ANSI)INFORMATION_SCHEMA views, 860SQL Server 2000 CE Edition, 834

Animated control. See Custom controls, animating

ANSI. See American National Standards Institute (ANSI)

API. See Application Programming Interface (API)

App Domain. See Application domainsApplication classes

message pump, 311.NET Compact Framework, 67–69.NET Framework, 36–38

Application domainsdefined, 1322.NET Compact Framework, 65OS processes and, 296

Application Programming Interface (API)defined, 1322Win32, 3–4

Applicationsloading with RAPI, 1024–1026printing programs, 1191–1192printing support, 1192–1193RAPI functions, 963

Applications, .NET Compact Frameworkclasses derived from, 82–83creating. See Designerdeployment options, 87–88elements of, 81–82

file generation with Smart Device Application Wizard, 84–85

GUI-based environment, 81libraries, 80–81options for running, 86project types, 83–85source code basis of, 81–82testing on emulator vs. testing with

device, 88ArrayList object, 436Arrays

of integers, 227–229P/Invoke support, 227as parameters, 226of pixels, 1063

Ascent, text drawing, 1159.asmx pages, 889ASP (Active Server Pages), 1321ASP.NET

defined, 1323Web site developers and, 34

ASP.NET Mobile Controlsdefined, 1323interface for small-screen devices, 34–35small-screen devices and, 68–69support for Windows CE devices, 956

Assembliescompared with namespaces, 134defined, 1323in GAC, 61references, 135–137, 802–805

ATL (ActiveX Template Library), 15Attributes

coordinate, 1239defined, 1323DllImport, 197, 200, 202drawing, 1222, 1240StructLayout, 257–259

Authentication, remote access, 912–917Automatic garbage collection, 1313, 1323Automatic mouse capture, 330

Yao_VB.book.fm Page 1338 Friday, May 21, 2004 10:40 AM

Page 3: Index [ptgmedia.pearsoncmg.com]ptgmedia.pearsoncmg.com/images/0321174046/index/yaoindex.pdf · Connected approach, ADO.NET, 800–801 Connections database connectivity, 910–912

INDEX 1339

Automatic parameter marshaling, 239, 1323

Auto-start method, ActiveSync, 1015–1016

BBackground color, 444–445, 1169–1170Background controls, 400–401Background threads, 296, 1191Bar graphs, 691Base classes

extending methods and, 638–639inheritance from, 298, 301–302input events, 324options for custom controls, 629–630overriding, 635–636shadowing base class method, 637–638

Basic Authentication mode, IIS, 912Battery backups, 742Binary array data types, 774, 776–777Binary data

BinaryWriter/BinaryReader objects, 752–753

reading to files, 762–763structures, 763–766transferring value data types to files,

760–761writing to files, 761–762

Binary portability, 17, 1323. See also Source code, portability

Binding objectsDataSet class, 815–818to multi-item controls, 818–819PMEs for, 491to single-item controls, 819–820

BindingsCollection property, 490–493Bitmap class, 1075–1076Bitmap fonts, Windows CE, 1123–1124Bitmaps

allocation and cleanup functions, 1314Bitmap class, 1075–1076

container for, 592creating, 1073–1074creating empty, 1076–1078creating from eternal files, 1078–1079creating from resources, 1079–1080drawing methods, 1086–1091editors for, 595GDI bitmap functions, 1222image file sizes and, 1085–1086.NET Compact Framework and, 69–70overview of, 1042–1043resources, 1080–1085roles of, 1074–1075toolbar buttons and, 591

Block mode, 1026–1027Block Recognizer, 351Blocking functions, 981Bluetooth

connections in IP networking, 1017printing support, 1186–1187support in PrinterCE, 1236

Boolean data types, 212, 214Bootloaders, 742Boxing

converting values to objects, 164–167defined, 1323

brText parameter, DrawString method, 1121Brushes

allocation and cleanup functions, 1314creating with named colors, 1072creating with RGB values, 1073creating with system colors, 1072defined, 1324GDI pen functions and, 1222methods for creating, 1071text color and, 1169types supported, 1071vector graphics, 1045

Button control, 455–466adding at runtime, 457–458Click event for Add button, 463–464

Yao_VB.book.fm Page 1339 Friday, May 21, 2004 10:40 AM

Page 4: Index [ptgmedia.pearsoncmg.com]ptgmedia.pearsoncmg.com/images/0321174046/index/yaoindex.pdf · Connected approach, ADO.NET, 800–801 Connections database connectivity, 910–912

INDEX1340

Button control, continuedClick event for Cancel button, 464–466Click event for New button, 458–463ImageList control and, 586overview of, 455–456PMEs, 456, 1274toolbar buttons compared with regular

buttons, 586, 596triggering actions for, 456–457

ButtonClick control, 587, 589ButtonClick events, 591Buttons property, toolbars, 590ByRef keyword, 215, 1005By-Reference

compared with By-Value, 214–215defined, 1324, 1331overview of, 211–212passing parameters, 224–226

Bytes, byte-level file I/O, 749–750ByVal keyword, 215By-Value

compared with By-Reference, 214–215defined, 1324, 1331passing parameters, 224–226passing simple data types, 211–212passing strings, 216

CC programming

compilers, 1030function overloading, 782–784

C# programmingC++ structures and, 141function overloading, 782interoperability with Visual Basic, 214

C++ programmingbuilding projects, 1143C# structures and, 141compilers, 1030function declaration, 235–238, 1028–1029string operations, 151

Call and block, 255Callback

ActiveSync, 1016–1023font enumeration and, 1143lack of support for, 257, 1138multithreaded environments and,

710–711, 716CallWin32 sample program, 229–233Capture

automatic mouse capture, 330defined, 1324event-capturing application, 278–281

Caretsallocation and cleanup functions, 1314creating/destroying, 378–379defined, 1324as keyboard pointer, 376moving, 380–381overview of, 328–329sample program, 376–381

Casting, type conversion, 782catch keyword, 982CeCreateProcess, 961, 1024–1025CeFindAllFiles, 992–999CeFindFirstFile, 992CeFindNextFile, 992Cells

in data structures, 511displaying information about current

cell, 513–514, 516CeRapiInit, 970–971CeRapiInitEx, 970–971CeRapiInvoke, 961, 1027, 1032CeRapiUninit, 970–971CeRegCloseKey, 1005CeRegCreateKeyEx, 1002CeRegOpenKeyEx, 1001–1002CeRegQueryValueEx, 1002, 1003–1004CeRegSetValueEx, 1002–1003, 1004–1005CF. See .NET Compact FrameworkCharacter data, input methods, 350–352

Yao_VB.book.fm Page 1340 Friday, May 21, 2004 10:40 AM

Page 5: Index [ptgmedia.pearsoncmg.com]ptgmedia.pearsoncmg.com/images/0321174046/index/yaoindex.pdf · Connected approach, ADO.NET, 800–801 Connections database connectivity, 910–912

INDEX 1341

Character sets. See also Unicode character setconverting, 163encoding/decoding, 753

CheckBox controloverview of, 466–467, 472PMEs, 1275RegisterMembers sample program,

472–477CIL. See Common Intermediate Language

(CIL)Class library project, 646Class View, Visual Studio. Designer, 89Classes, 113–117

ADO.NET, 70–71, 802byte-level (stream) reading/writing,

749–750component classes compared with object

classes, 115–116control classes for keyboard input, 349control classes supported by .NET

Compact Framework, 391–392custom, 113, 116–117derived, 82–83dialog box, 611drawing, 1050encoding class, 754file I/O, 754–757file manipulation, 748higher-level reading/writing, 750–753Life game, 699–700menu, 586mouse cursor, 344–345namespaces and, 123.NET Compact Framework compared

with Win32 API functions, 195–196object, 43object-oriented programming and, 130PrinterCE, 1237registry utility, 784–788subclassing, 367–370toolbar, 586

Classes, SQL Serveroverview of, 865–866SqlCommand class, 876–882SqlConnection class, 868–875

Classes, SQL Server CESqlCeCommand class, 839SqlCeConnection class, 839SqlCeDataAdapter class, 853–860SqlCeDataReader class, 843–851

Cleanup functions. See Garbage collectionClearType fonts, 1118CLI. See Common Language Infrastructure

(CLI)Click events

for Add button, 463–464for Cancel button, 464–466controls and, 332–333Label control and, 446–447mouse events and, 324for New button, 458–463

Click-to-clunk time, 1194, 1196Client applications, Web services, 899–903Client areas

defined, 1324windows, 1041

Client/server relationships, Windows CE, 20

Clip rectangle, 1166Clipboard

allocation and cleanup, 1314support, 562–566TextBoxClipboard sample program,

560–561Clipping

defined, 1324window boundaries and, 1041, 1166

Closing forms, 284–286CLR (Common Language Runtime), 46,

1325CLS (Common Language Specification),

46–47, 1325

Yao_VB.book.fm Page 1341 Friday, May 21, 2004 10:40 AM

Page 6: Index [ptgmedia.pearsoncmg.com]ptgmedia.pearsoncmg.com/images/0321174046/index/yaoindex.pdf · Connected approach, ADO.NET, 800–801 Connections database connectivity, 910–912

INDEX1342

Codeadding to Cistern sample program, 105defensive coding in RAPI, 981–982for dialog boxes, 621–622format, 103IntelliSense code completion aid,

125–128source code as basis of .NET Compact

Framework applications, 81–82verifiable, 130

Code ViewCistern sample program, 101inheritance and, 301Visual Studio Designer, 89–90, 92

Cold boot, 742Color, See also System Colors

Black, RGB value, 1070named colors, 1068–1069RGB values, 594, 1068, 1070–1071specifying, 1064–1065system colors, 1065–1067text, 1169–1170TextColor sample program, 1170–1176

Columnsaliasing column names, 835mapping data objects to, 513styles in DataGrid control, 505–508

COMAdvise Sink and, 1016component classes and, 115–116overview of, 5–6role in Microsoft strategy, 3

COM interopActiveSync and, 959.NET Compact Framework not support-

ing, 115, 255–256ComboBox control, 450–455

binding/unbinding tasks to, 495–496as combination of textbox and listbox,

473–474complex data binding and, 489–490

PMEs, 451, 1276sample program, 454–455visual comparison with ListBox control,

451Command input controls, 399–400Command objects

based on stored procedures, 883, 886–887SQL Server, 876–882

commdlg.dll library, 1198Common dialog boxes, 604, 1324Common Intermediate Language (CIL)

building .NET programs, 43–45defined, 1324portability and, 17Windows CE and, 45

Common Language Infrastructure (CLI)defined, 1324–1325interoperability and, 129overview of, 30–31subset of .NET Framework, 48

Common Language Runtime (CLR), 46, 1325

Common Language Specification (CLS), 46–47, 1325

Common type system (CTS)assembly references, 135–137as building block for .NET programming,

48checking control type, 426defined, 1325Hungarian notation prefixes, 1259–1260memory management. See Memory

managementnamespaces, 131–133overview of, 129–130reference types, 142–144standard types, 137strings, 148–156type conversion, 156–167value and reference types, 144–148value types, 137–139

Yao_VB.book.fm Page 1342 Friday, May 21, 2004 10:40 AM

Page 7: Index [ptgmedia.pearsoncmg.com]ptgmedia.pearsoncmg.com/images/0321174046/index/yaoindex.pdf · Connected approach, ADO.NET, 800–801 Connections database connectivity, 910–912

INDEX 1343

Communication protocols, RAPI, 981Compact Flash cards, 739, 743, 984Comparison operators, 426Compatibility, Windows CE design goals,

18–19Compiled languages, vs. interpreted

languages, 44Compilers

C/C++, 1030.NET Compact Framework, 47

Complex data binding. See Data binding, complex

Component classescompared with object classes, 115–116controls derived from, 387

Compression, 1043, 1085–1086Concurrency protection, SQL Server,

886–887Connected approach, ADO.NET, 800–801Connections

database connectivity, 910–912detecting, 1022–1023device connection detection, 1015HTTP, 907, 1317IP networking, 1017remote connectivity, 908–909SQL Server, 868–875SQL Server 2000 CE Edition, 839TCP/IP, 908well connectedness as design goal,

19–20Constraints, database, 834Constructors

default for DateBox custom control sample program, 657–658

for forms, 282–283WaterTemp, 668

Container controlsfor bitmaps, 592for menu items, 553overview of, 396

Context menus, 559–566creating with Designer, 561–562custom controls, 634DateBox control sample program and,

659–661drill-down applications, 522overview of, 559–566TextBox control and, 562–566TextBoxClipboard sample program,

560–561Control categories

background, 400–401command input, 399–400container, 396multi-item, 398–399overview of, 395parent, 395–396single-item, 397–398visual numeric value, 400

Control classcontrols derived from, 387data binding built into, 490event inheritance support, 431extending controls based on, 626as foundation of Custom controls, 687method inheritance support, 430as parent control, 395–396PMEs, 397, 1273property inheritance support, 428–429testing supported PMEs with Con-

trolPME utility, 547–578Control events

core events, 402–404Disposed event, 404–408EnabledChanged event, 413event inheritance support, 431GotFocus and LostFocus events, 413–414list of core events, 405–406ParentChanged event, 408–409Validating and Validated events,

409–413

Yao_VB.book.fm Page 1343 Friday, May 21, 2004 10:40 AM

Page 8: Index [ptgmedia.pearsoncmg.com]ptgmedia.pearsoncmg.com/images/0321174046/index/yaoindex.pdf · Connected approach, ADO.NET, 800–801 Connections database connectivity, 910–912

INDEX1344

Control methodscoordinate conversion, 421list of core, 420method inheritance support, 430object cleanup, 421thread-safe function calls, 421visibility, 423z-ordering, 422

Control propertiescomplex data binding, 488control state properties, 419–420data-binding properties, 419overview of, 414–415parent/child properties, 415–417positional properties, 418–419property inheritance support, 428–429viewing, 409

Control state, 419–420Control.Invoke method, 977–978ControlPME

detecting PME support, 1271overview of, 548–549running as desktop .NET Framework

program, 549testing controls with, 67

Controlsadding to applications, 99–105adding to derived forms, 303–305binding to multi-item controls, 818–819binding to single-item controls, 819–820Button, 455–466CheckBox, 466–472checking control type, 426classes supported by .NET Compact

Framework, 391–392ComboBox, 445–450commonly used, 426–427comparing control references, 425–426complex data binding, 488composite. See Custom controls,

composite

creating at runtime, 110–113custom. See Custom controlsdevelopment environment and, 394–395dialog boxes. See Dialog boxesdrawing in, 1056–1059fonts, 1124–1125forms, 294–295grabbing events for. See Event grabber

sample programHungarian notation, 96images. See ImageList controlinherited does not equal supported,

325–327, 397, 547input devices, 318–320input events, 320–327keyboard input, 349Label, 441–442ListBox, 450–455menus. See Menusmethods for extending, 626–627mouse events, 331.NET Framework basis of, 389as objects, 387–389, 627overview of, 387platform look and feel and, 393–394platform richness and, 393PMEs. See Properties, Methods, & Events

(PMEs)RadioButton, 466–472separating processing of data from dis-

play of data, 399size constraints on .NET Compact

Framework, 390steps in producing desired control at

desired location, 438–439TextBox, 448–450TimeTracker sample program, 432–441toolbars. See ToolBar controltypecasting, 424–425upgrading or adding features to, 567window, 312

Yao_VB.book.fm Page 1344 Friday, May 21, 2004 10:40 AM

Page 9: Index [ptgmedia.pearsoncmg.com]ptgmedia.pearsoncmg.com/images/0321174046/index/yaoindex.pdf · Connected approach, ADO.NET, 800–801 Connections database connectivity, 910–912

INDEX 1345

Controls property, 415–416Coordinate conversion, 421Coordinate system, pixels, 691coredll.dll

GDI drawing functions, 1038, 1189GDI output functions, 1215registry functions in, 774

CPUsCPU independence, 55Windows CE requirements, 10

Create Publication Wizard, 1300–1311CreateGraphics method, 1055, 1057–1058CreateWindow function, 18Critical sections, 1314C-style function declarations, 206–208CTS. See Common type system (CTS)CType( ), 166Current row capability, objects, 493Cursor class, 344–345Cursors

allocation and cleanup functions, 1315binding cursoring capability to objects,

492defined, 1325displaying available, 347–348emulator support for, 346–347overview of, 328–329setting mouse cursor, 344–347

Custom controlsbase class options for, 629–630context menus and, 634design recommendations, 628inherited does not equal supported,

631–634methods for extending controls, 625–626packaging, 628PMEs for, 630–634, 635–643reasons for creating, 625–626testing, 634–635as wrappers around native windows

classes, 628–629

Custom controls, animating, 693–706game of Life program, 693–700object reuse, 705overview of, 693speed and flicker and, 700–705

Custom controls, composite, 678–686benefits of, 687defined, 679as method of extending controls, 627overview of, 678–680PMEs, 680relationships between components,

683–686TaskStatus control, 680–686

Custom controls, derived, 643–678code for DateBox, 650–653code for WaterTemp, 668–673context menu for DateBox, 659–661Date property for DateBox, 653–655default constructor for DateBox, 657–658design decisions for WaterTemp, 665–667exposing custom control content,

646–649Format property for DateBox, 656–657as method of extending controls, 626MinValue/MaxValue properties for

DateBox, 656overview of, 643–644testing DateBox, 661–664Text property for DateBox, 655–656typical needs for customization, 645Validating event handler for DateBox,

658validating/filtering incoming data,

649–650WaterBox object, 673–678WaterTemp sample program, 664

Custom controls, design-time supportadding to Visual Studio toolbox, 719–734building and installing design-time

control, 729–733

Yao_VB.book.fm Page 1345 Friday, May 21, 2004 10:40 AM

Page 10: Index [ptgmedia.pearsoncmg.com]ptgmedia.pearsoncmg.com/images/0321174046/index/yaoindex.pdf · Connected approach, ADO.NET, 800–801 Connections database connectivity, 910–912

INDEX1346

Custom controls, design-time support,continued

development process, 724exposing contents of a custom control,

646–649obstacles to, 720overview of, 722–723property values, 733–734recommendations for custom controls, 628setup process, 723–724setup sample program, 724–729tips for custom controls, 687troubleshooting tips, 731–732WaterTemp sample program, 665–667

Custom controls, multithreaded environ-ment, 706–719

callback routine, 710–711main thread, 707MultiThread sample program, 711–719overview of, 706–707passing data between threads, 708–709queues for threads, 709–710service threads, 707testing, 712–715

Custom controls, new, 686–692design tips, 687display provided for TaskStatus control,

689–692drawing in, 689events supported, 687forcing redrawing, 688as method of extending controls, 627overriding drawing and, 687–688

DData binding

bindable data objects, 482–487Binding objects, 491, 815–820complex vs. simple, 480–482control properties, 419DataGrid. See DataGrid control

overview of, 479–481PMEs, 1273single-item controls and, 398

Data binding, complexcompared with simple, 480–482control properties for, 488controls that support, 488DataGrid control and, 497, 502ListBox and ComboBox controls and,

489–490overview of, 487

Data binding, simpleBindingsCollection property, 490–493compared with complex, 480–482formatting and parsing, 493–496overview of, 490PMEs, 491single-item controls and, 398

Data objectsbindable, 482–487mapping DataGrid control to, 512–513

Data providersADO.NET, 71–72, 797classes, 796–797defined, 1325provider-independent classes, 799provider-specific classes, 799

Data sets. See DataSet controlData structures, 216–223

binary data, 763–766built-in value types, 140–141cells in, 511passing as P/Invoke parameters, 216passing to unmanaged function, 217–219tabular, 482types not supported by P/Invoke, 219XML file I/O, 767

Data synchronization, 1297–1310. See also ActiveSync

control properties, 650data table changes, 813

Yao_VB.book.fm Page 1346 Friday, May 21, 2004 10:40 AM

Page 11: Index [ptgmedia.pearsoncmg.com]ptgmedia.pearsoncmg.com/images/0321174046/index/yaoindex.pdf · Connected approach, ADO.NET, 800–801 Connections database connectivity, 910–912

INDEX 1347

mobile data. See Mobile dataWindows CE options, 798

Data Synchronization WizardsCreate Publication Wizard, 1300–1311Virtual Directory Creation Wizard,

1297–1300Data tables. See DataTable controlData types

as P/Invoke parameters, 211–212parameter passing and, 224–226as parameters in sample program,

229–233registry supported, 776–777storage types supported by ADO.NET,

796–797Windows CE, 774

Data values, registry, 774Data views. See DataView classDatabase connectivity, 910–912Database enumerator, 1315Databases. See also SQL Server 2000 CE

Editionallocation and cleanup functions, 1315building data set from, 862–864controls managing data in, 479displaying data in, 843–851enumerating, 1012–1015moving data between data sets and, 853populating SQL Server CE, 839–842retrieving data from, 843–851, 853–855SQL Server CE, 837–839submitting SQL statements to, 839–842synchronizing local and remote. See

Mobile dataupdating, 851–860

DataBindings collection, 816DataGrid control, 496–545

accessing information, 516–522complex data binding with, 497, 502display styles, 502–505drill-down capability, 522–527

in-place editing capability, 528–534in-place editing capability, automating,

534–545overview of, 496–497PMEs, 498–501, 1277simple data binding with, 515–516style creation at runtime, 508–510table and column styles, 505–508user input and, 510–515

DataGridTableStyleObject, 502DataRow class

adding rows to tables, 841–842assigning controls to a row, 825binding rows to controls, 820indexing, 822–824matching binding, 821–822search keys, 824–825working with, 814

DataSet control, 809–829advantages/disadvantages, 809–810binding to multi-item controls, 818–819binding to single-item controls, 819–820building data sets from database,

862–864creating and accessing, 810–811data binding and, 815–818data rows, 814data tables, 812–813data views, 814–815overview of, 809–810reading/writing data sets as XML,

827–829row controls, 825row methods, 820–825stored procedures and, 882–886updating bound data table, 825–826

DataTable controladding rows to tables, 841–842creating and accessing, 810–811creating tables, 839–840data binding and, 816

Yao_VB.book.fm Page 1347 Friday, May 21, 2004 10:40 AM

Page 12: Index [ptgmedia.pearsoncmg.com]ptgmedia.pearsoncmg.com/images/0321174046/index/yaoindex.pdf · Connected approach, ADO.NET, 800–801 Connections database connectivity, 910–912

INDEX1348

DataTable control, continueddata views and, 814–815information, 514overview of, 809, 812–813populating, 811rows, 814updating, 820updating bound data table, 825–826

DataView classcreating and accessing, 810–811data binding and, 816, 820overview of, 809working with, 814–815

Date property, DateBox, 653–655DateBox control, 644–664

code for, 650–653context menu, 659–661Date property, 653–655exposing custom control content,

646–649Format property, 656–657MinValue and MaxValue properties,

656overview of, 644–646testing, 661–664Text property, 655–656Validating event handler, 658

DateBox, design-time versionbuilding and installing, 729–733property values, 733–734setting up project, 724–729

DC. See Device Context (DC)Debugger, viewing control properties, 409Debugging

mouse input, 341–343network-based, 986P/Invoke, 198

Declarations, P/Invoke. See P/Invoke wrappers

_declspec (dllexport), 1028Decoding data, file I/O, 753–754

Delegatesdefined, 1325managed to unmanaged code, 1139

depends.exe, 63Deployment options, .NET Compact

Framework programs, 87–88Design goals

.NET Compact Framework, 48–51Windows CE, 8–21

Design Viewbase class layout and, 305inheritance and, 301Toolbox controls and, 99Visual Studio Designer, 89, 92–94

Designer (in Visual Studio)adding classes, 113–117adding code to Cistern sample program,

105adding controls, 99–105adding forms, 106–110building programs for Pocket PC,

104–105Cistern sample program, 98–99context menus, 561–562creating ImageList control, 593creating programs with, 85–86creating styles at runtime, 508–510creating toolbars, 590detecting properties with, 731–732events and event handlers, 106–108file dialog box set up, 604form classes and form files, 93–98form creation, 281–283generating code, 92–98IntelliSense code completion aid, 125–128menu layout with, 553–554modifying code, 82namespaces, 121–125naming controls, 556overloading functions, 117–118regions, generating and creating, 98

Yao_VB.book.fm Page 1348 Friday, May 21, 2004 10:40 AM

Page 13: Index [ptgmedia.pearsoncmg.com]ptgmedia.pearsoncmg.com/images/0321174046/index/yaoindex.pdf · Connected approach, ADO.NET, 800–801 Connections database connectivity, 910–912

INDEX 1349

Shared methods, 119–121steps in producing desired control at

desired location, 438–439Design-time controls

building and installing, 729–733development process for, 724project setup, 724–729setup process for, 723–724testing, 721

Desktop computersbitmaps on, 1074consistency of .NET Compact Frame-

work with .NET Framework, 51–53drawing compared with smart device

drawing, 1045–1046drawing coordinates in Desktop

Windows vs. Windows CE, 1216Windows CE compared with desktop

Windows, 255workarounds for desktop programmers,

435Device buttons, 350Device buttons, Pocket PC, 359–361Device Context (DC)

allocation and cleanup functions, 1315defined, 1325drawing and, 1058–1059print jobs and, 1220

Device driversdisplay device drivers, 1190managed code and, 23mobile printing, 1230printer device drivers, 1190, 1199, 1205stream interface drivers, 1007Windows CE, 15

Device-aware graphics programming, 1215–1216

Device-independentlogical drawing model, 1216–1218overview of, 1215programming interface, 1218

Device-independent bitmaps (DIBs)defined, 1325image formats and, 594raster graphics and, 1044Windows CE support for, 1042

Dialog boxes, 601–622allocation and cleanup functions, 1316built-in, 602–605common, 604, 1324controlling Options dialog box, 617–622creating Options dialog box, 615–616custom, 607–608DialogBoxes sample application,

614–615FileDialogs sample program, 605–607full-screen, 610impact on performance, 605overview of, 601–602Pocket PC, 608–610Pocket PC task list problem, 613–614programming, 610–612steps in creating, 615

DialogBoxes sample application, 614–615DIBs. See Device-independent bitmaps

(DIBs)Direct printing

defined, 1190drawbacks of, 1206–1207overview of, 1205–1207to PCL printer, 1207–1208PrintDirect sample program,

1209–1214DirectCast( ), 166Directory classes, File I/O, 747–748Disconnected approach, ADO.NET,

800–801Discoverability, .NET Framework

elements, 122Disk partitions, Windows CE, 984Display list languages, 1184Display Postscript, 1185

Yao_VB.book.fm Page 1349 Friday, May 21, 2004 10:40 AM

Page 14: Index [ptgmedia.pearsoncmg.com]ptgmedia.pearsoncmg.com/images/0321174046/index/yaoindex.pdf · Connected approach, ADO.NET, 800–801 Connections database connectivity, 910–912

INDEX1350

Display screensaccessing graphics objects, 1053–1056drawing in controls with, 1056–1059as drawing surface, 1041non-Paint event drawing, 1062–1063overview of, 1053Paint events and, 1059–1062

Dispose method, 178–184, 406–407, 421, 1055–1056

Disposed, control events, 404–408DLL hell, 5, 1325DllImport attribute, 197, 200, 202DLLs (Dynamic Link Libraries), 1026–1034

building with eMbedded Visual C++, 1029–1031

calling DLL function with CeRapiIn-voke, 1032

context menus, 634custom controls as, 628declaring C++ functions in a DLL,

235–238defined, 1325–1326information needed for application

access to, 973–974installing unmanaged DLLs in Windows

CE, 233–234loading, 1024.NET Compact Framework, 80RAPI functions, 963Win32, 234

Docking cradle, Pocket PC, 950Document Object Model (XML DOM), 73Document type definitions (XML DTDs),

73Documentation, control development,

394–395DOM (XML Document Object Model), 73DomainUpDown control, 1278DotGNU, 31Dots game. See JasperDots game sample

program

DrawImage methodbitmap support, 1075drawing at original image size, 1087drawing part of bitmap at original image

size, 1087–1088drawing with changed image size, 1088drawing with changed image size and

with transparency, 1089–1091of Graphics class, 1086

Drawing attributesGDI functions, 1222PrinterCE, 1240

Drawing function familiesgraphical output, 1044–1045raster output, 1044–1045text output, 1044vector output, 1045

Drawing functionsbitmaps, 1074, 1086–1091in controls, 1056–1059coordinates in Desktop Windows vs.

Windows CE, 1216in custom controls, 689drawing routine for a generation,

703–705forcing redrawing in custom controls,

688GDI functions, 1219–1221.NET Compact Framework, 70overriding drawing in custom controls,

687–688PrinterCE, 1239rectangles, 340–341

Drawing surfaces, 1040–1043bitmaps, 1042–1043, 1074display screens, 1041metafiles, 1043overview of, 1040–1041printers, 1042

DrawLine method, 1122–1123DrawRectangle method, 1099

Yao_VB.book.fm Page 1350 Friday, May 21, 2004 10:40 AM

Page 15: Index [ptgmedia.pearsoncmg.com]ptgmedia.pearsoncmg.com/images/0321174046/index/yaoindex.pdf · Connected approach, ADO.NET, 800–801 Connections database connectivity, 910–912

INDEX 1351

DrawRectangles sample program, 333–338background grid enabled, 342collecting points for, 338–340drawing rectangles, 340–341rubber rectangles, 333–338

DrawString methodclipping and, 1166of Graphics class, 1118overloads, 1158–1159parameters, 1120–1121SimpleDrawString sample program,

1121–1122word wrap support, 1166–1169

Drivers. See Device driversDropDownButton, 591DTDs (XML Document type definitions), 73Duplicate Definition warning, 726Dynamic Link Libraries. See DLLs

(Dynamic Link Libraries)

EEmbedded devices, 53–55eMbedded Visual Basic, 15, 16, 1326eMbedded Visual C++

building DLLs, 1029–1031building unmanaged code projects, 1143creating Win32 DLLs, 234defined, 1326developing Windows CE applications,

25–29documentation, 26emulator, 25–26obtaining, 29remote tools, 26–28

eMbedded Visual Tools, 774, 1000, 1326EMFs (Enhanced Metafiles), 1043, 1326ems, 1241, 1243Emulator

ActiveSync and, 954defined, 1326mouse input support, 346–347

testing programs on, 88tips for using, 25–26

Emulator ActiveSync Connection Tool, 954Enabled property, 313–314, 419EnabledChanged, 413Encoding data, file I/O, 753–754Enhanced Metafiles (EMFs), 1043, 1326EnumFontFamilies, 1135, 1143Error handling

ADO.NET, 807–808remote environment and, 908

Event grabber sample program, 567–585cleanup code for, 571defined, 1327getting messages into managed code,

581–585location of, 568startup and shutdown code for, 570subclassing, 568–581upgrading or adding features to controls,

567Event handlers

adding, 279controls and, 388defined, 81dialog boxes, 611, 621–622file dialog boxes, 605–607HP Mobile Printing, 1234keyboard input, 361–363mouse events, 338–340mouse input, 330–333multithreading and, 295–296naming, 403overriding base event handler, 640–642parameters, 108, 403–404printing, 1223–1224RadioButton control, 470–471vs. subclassing, 367TimeTracker sample program, 439–441Validating event handler, 658, 683–685writing, 106–108, 402, 439–441

Yao_VB.book.fm Page 1351 Friday, May 21, 2004 10:40 AM

Page 16: Index [ptgmedia.pearsoncmg.com]ptgmedia.pearsoncmg.com/images/0321174046/index/yaoindex.pdf · Connected approach, ADO.NET, 800–801 Connections database connectivity, 910–912

INDEX1352

Events. See also Properties, Methods, & Events (PMEs)

allocation and cleanup functions, 1316communicating between managed and

unmanaged code, 255controls raising, 106custom controls, 639–643, 687DataGrid, 500–501defined, 81event-capturing application, 278–281event-driven input, 310–312forms, 274–275keyboards, 315–316, 354–357as means of communication between

controls and programs, 427mouse, 316–317, 323–324, 329–330overriding methods that raise events,

639–640sequences, 357subset in .NET Compact Framework, 323Win32 messages and, 404writing event handlers for, 106–108

Events, controlDisposed event, 404–408EnabledChanged event, 413GotFocus and LostFocus events, 413–414overview of, 402–404ParentChanged event, 408–409Validating and Validated events, 409–413

Exception handling, 159–160, 982EXE files, 628eXecute In Place (XIP), 744, 1326Explicit conversion, numeric types, 158eXtensible Stylesheet Language (XSL), 74extern keyword, 1028External leading, typographic, 1158

FFAT (File Allocation Table), 1326Fields

defined, 1326Hungarian notation, 96

in .NET type system, 132object-oriented programming, 130

FieldSoftware PrinterCE. See PrinterCEFile Allocation Table (FAT), 1326File classes, File I/O, 747–748File dialog boxes

built-in, 602event handlers, 605–607New, Open, Save, Save As items, 605performance impact of, 605

File Explorer, 830File I/O, 746–773

binary, 760–766binary structures, 763–766byte-level (stream) classes for reading/

writing, 749–750categories of, 746encoding/decoding data, 753–754file manipulation classes, 748higher-level classes for reading/writing,

750–753reading binary data, 762–763text file I/O, 757–760using I/O classes, 754–757writing binary data, 761–762XML file I/O, 766–769

File systems. See also File I/Ohierarchical, 740Remote API (RAPI) functions, 964–965Windows CE, 982

FileDialogs sample program, 605–607Files

allocation and cleanup functions, 1316generating program files with Smart

Device Application Wizard, 84–85.NET Compact Framework, 57–62SQL Server 2000 CE Edition, 830–831supported file types for mobile printing,

1229FileStream class, 749, 1212FillRectangle method, 1099Filters, Merge Replication, 932

Yao_VB.book.fm Page 1352 Friday, May 21, 2004 10:40 AM

Page 17: Index [ptgmedia.pearsoncmg.com]ptgmedia.pearsoncmg.com/images/0321174046/index/yaoindex.pdf · Connected approach, ADO.NET, 800–801 Connections database connectivity, 910–912

INDEX 1353

Finalize method, garbage collection, 179–184

Flags, for calling unmanaged functions, 203

Flash ROM, 739Flicker, minimizing, 700–705Floating-point values, 139–140, 206Focus

defined, 1326events for input devices, 354–355property for input devices, 314–315

Folders, Windows CE, 982Font enumeration

FontList sample library, 1138–1143FontPicker sample program, 1136–1138generic fonts, 1126named fonts, 1135–1136

Font mangling, 1125Font mapping, 1124font parameter, DrawString method, 1121Font property, controls, 1124–1125FontList sample library, 1138–1143fontlist.dll, 1214FontPicker sample program, 1136–1138Fonts

allocation and cleanup functions, 1317defined, 1326enumerating, 1135–1136fixed-pitch vs. variable-pitch, 1118Font property of controls, 1124–1125FontList sample library, 1138–1143FontPicker sample program, 1136–1138GDI functions, 1222generic, 1125–1128GenericFonts sample program,

1128–1132named, 1132–1135native-code, 1144–1150overview of, 1123–1124RotateText sample program, 1150–1154size selection, 1240–1241text drawing and, 1044

Foreground color, 1169–1170Foreground window, 312–313Form class

custom dialog boxes and, 607–608deriving forms from, 267–268events, 274–275methods, 273–274as parent control, 395–396properties, 268–272Visual Studio Designer, 93–98

Form files, Visual Studio Designer, 93–98Format property, DateBox, 656–657Formats

image files, 593–594raster graphics, 1042

Formatting data, 493–496FormImage method, 1056Forms

adding and viewing second, 108–110adding to applications, 106–110closing, 284–286controls collection, 294–295creating, 281–283deriving from Form class, 267–268displaying, 283–284events, 277–278inheritance, 298–306methods, 276minimizing, 287multithreading, 295–297orphaned, 285–287on Pocket PC, 266sample event-capturing application,

278–281sample weather application, 288–292on small-screen devices, 267tracking, 292–294unique qualities of, 265–266window, 312

Forms collectionVisual Basic vs. Visual Basic.NET, 292Weather application, 293–294

Yao_VB.book.fm Page 1353 Friday, May 21, 2004 10:40 AM

Page 18: Index [ptgmedia.pearsoncmg.com]ptgmedia.pearsoncmg.com/images/0321174046/index/yaoindex.pdf · Connected approach, ADO.NET, 800–801 Connections database connectivity, 910–912

INDEX1354

FTP file handle, 1317Function overloading

block mode and stream mode, 1026–1027Designer and, 117–118.NET Framework, 977–978registry access by, 782–784

GGAC (global assembly cache), 61, 62–64Games

JasperDots, 1101–1114Life, 693–700

Garbage collection, 170–186automatic, 173–175calling garbage collector, 176–178class-specific methods, 179–184defined, 1327features, 174managed code, 22manual, 178–179, 185–186nondeterministric, 144, 404phases of, 174–175pools, 170–172unmanaged code, 1149–1150weak references and, 184–185Windows API (Win32) cleanup func-

tions, 1313–1320Garbage Collector Pools, 170–172, 1327GC. See Garbage collectionGDI. See Graphics Device Interface (GDI)Generic fonts, 1125–1132Generic Internet Explorer (GENIE), 49, 68GenericFonts sample program, 1128–1132GIF files

compression, 1086creating bitmaps from, 1079image formats, 594

Global assembly cache (GAC), 61, 62–64, 1327

Global input state, 422–423Glyphs, 1134, 1327

GotFocus, 413–414Grabbing Events. See Event grabber

sample programGraphical output, 1037–1115

desktop drawing compared with smart device drawing, 1045–1046

drawing function families, 1044–1045drawing surfaces, 1040–1043Graphics class, 1050–1053namespaces, 1045, 1047overview of, 1037–1040raster graphics. See Raster graphicssupported by .NET Compact Frame-

work, 69–70vector graphics. See Vector graphics

Graphical user interface (GUI), 81Graphics class, 1050–1056

accessing graphics objects, 1053–1056adding graphic images, 585–587DrawImage method, 1075, 1086drawing methods in, 1050DrawString method, 1118–1121graphics object support for bitmaps, 1075raster drawing support, 1051–1052text drawing support, 1051vector drawing support, 1051–1052

Graphics Device Interface (GDI), 1215–1227

allocation and cleanup functions, 1317as core graphic library, 1038defined, 1327device independence, 1215device-independent logical drawing

model, 1216–1218device-independent programming

interface, 1218drawing attributes, 1222drawing functions, 1219–1221PrintGDI sample program, 1223–1227printing functions, 1219–1221query functions, 1218–1219

Yao_VB.book.fm Page 1354 Friday, May 21, 2004 10:40 AM

Page 19: Index [ptgmedia.pearsoncmg.com]ptgmedia.pearsoncmg.com/images/0321174046/index/yaoindex.pdf · Connected approach, ADO.NET, 800–801 Connections database connectivity, 910–912

INDEX 1355

sequence for working with GDI drawing objects, 1149

Windows CE support for, 1218Graphics subsystem

defined, 1181for printing, 1189–1191

Guest partnership, ActiveSync, 951–953GUI (graphical user interface), 81

HHandles keyword, 388Hard limits, Windows CE, 65Hard real-time requirements, 21Higher-level file I/O, 750–753Hit test, mouse, 510, 512, 527Hooks, allocation and cleanup functions,

1317HP Mobile Printing, 1227–1234

limitations of, 1230overview of, 1227–1228for Pocket PC, 1228–1230PrintHPMobile sample program,

1233–1234SDKs, 1231–1233

HRESULT values, 970, 1028HScrollBar control, 1279HTML, 39–40, 887–888HTTP

allocation and cleanup functions, 1317vs. HTTPS, 898mobile connectivity, 907

HTTPS, 898Hungarian notation, 1249–1270

benefits of, 1257for controls, properties, and fields, 96defined, 1327goals and objectives of, 1250guidelines for, 1250–1252menu names, 557.NET naming guidelines and, 1252–1255prefixes for Microsoft.Win32 class, 1262

prefixes for Microsoft.WindowsCE.Forms classes, 1264

prefixes for private data, 1257–1259prefixes for standard value types,

1259–1260prefixes for System.Collection classes,

1262prefixes for System.Data classes,

1265–1267prefixes for System.Drawing classes,

1264–1265prefixes for System.IO classes, 1267–1268prefixes for System.Text classes, 1261prefixes for System.Threading classes,

1268prefixes for System.Windows.Forms

classes, 1262–1264prefixes for Usage and System classes,

1260–1261as style instead of standard, 1256variable naming and, 439Win32 pointers and, 221

II/O channels

defined, 1181PrinterCE and, 1236for printing, 1185–1188

Icons, 1317IDE (Integrated Development Environ-

ment), 24IDENTITY property, 923–924IIS. See Internet Information Services (IIS)IL. See Common Intermediate Language

(CIL)ildasm.exe

defined, 1327hidden features, 64inheritance and, 634overview of, 62–63viewing PrinterCE public classes, 1237

Yao_VB.book.fm Page 1355 Friday, May 21, 2004 10:40 AM

Page 20: Index [ptgmedia.pearsoncmg.com]ptgmedia.pearsoncmg.com/images/0321174046/index/yaoindex.pdf · Connected approach, ADO.NET, 800–801 Connections database connectivity, 910–912

INDEX1356

Image class, 1041, 1075–1076Image Collection Editor, 593Image files. See also Bitmaps

formats, 593–594sizes, 1085–1086

ImageList control, 592–595as background control, 400as container for bitmaps, 592controls using, 593image formats and, 593–594toolbar buttons and, 586where to get images, 595

Immutabilitylimiting properties to immutable types,

667of strings, 152–153, 216, 666

Imports statementfor custom controls, 715setting references with, 651, 680

Indexing, 820, 822–824INFORMATION_SCHEMA views, 860Infrared

connections, 1017ports, 1186

Inheritance, 298–306adding controls to derived forms,

303–305from base class, 298, 301–302inherited does not equal supported,

325–327, 397, 547, 631–634visual inheritance, 298workarounds for lack of visual inherit-

ance, 299–301In-place editing capability, 528–545

automated, 534–545manual, 528–534steps in providing, 528

Input devicescarets and cursors, 328–329conditions for, 312control support for input events, 320–325

controls, 318–320determining a control’s support for

specific events, 325–327Enabled vs. Disabled properties, 313–314event-driven input, 310–312foreground window, 312–313keyboard input. See Keyboard inputlocal and global input states, 422–423mouse input. See Mouse inputoverview of, 307–312visibility, 314Windows CE support for Win32 input,

317–318Input method, 1327Installable file systems

defined, 1327extending storage space, 982names, 984Windows CE, 743

Integer data typesas CTS value type, 139–140passing array of integers, 227–229registry supported, 776–777signed vs. unsigned integers as P/Invoke

parameters, 214unmanaged functions and, 206Windows CE, 774

Integrated Development Environment (IDE), 24

Integrated Windows Authentication mode, IIS, 912

IntelliSensecode completion aid, 125–128inheritance and, 633overriding form properties, 295writing event handlers with, 279

Internal leading, typographic, 1157, 1241Internet Information Services (IIS)

benefits of, 909–910configuring, 918creating virtual directory for, 912–917

Yao_VB.book.fm Page 1356 Friday, May 21, 2004 10:40 AM

Page 21: Index [ptgmedia.pearsoncmg.com]ptgmedia.pearsoncmg.com/images/0321174046/index/yaoindex.pdf · Connected approach, ADO.NET, 800–801 Connections database connectivity, 910–912

INDEX 1357

modes, 912remote connectivity and, 908–909

Internet Server Application Programming Interface (ISAPI), 911–912

Interoperability, 129. See also COM interopInterpreted languages, 44IntPtr data type, 238, 246Invalid windows, 1059–1060Invoke method, 421, 707iPaq, 1227ISAPI (Internet Server Application

Programming Interface), 911–912ixio Smart Data Machine, 71

JJasperDots game sample program,

1101–1114DotControl class, 1105–1107overview of, 1101–1102Paint and Click event handlers for,

1102–1105Square and Player structures, 1114Squares class, 1107–1114vector graphics methods in, 1101

JIT Compilation, 45, 1328JITted code pool, 168–170JITting. See JIT CompilationJPEG files

bitmaps and, 1073compression, 1086creating bitmaps from, 1078defined, 1328as image format, 594

Kkeybd_event function, 353–354, 381Keyboard input

Caret sample program, 376–381control classes, 349control supporting input events, 320–325controls, 318–320

device buttons, 350event handlers, 361–363events, 354–357KeyInput sample program, 363–365keys, 357–359KeyState sample program, 373–376overview of, 314–316Pocket PC device buttons, 359–361Pocket PC external keyboards, 610Pocket PC input method, 351SIP methods, 350–352Sleep sample program, 381–383sources, 349–350Unicode character set, 364

KeyInput sample program, 363–365Keys, input with, 357–359Keys, registry, 774–775, 778–779KeyState sample program, 373–376

LLabel control, 441–447

background color, 444–445Label class, 325mouse click events, 446–447overview of, 441–442Paint event drawing and, 1062PMEs, 1280text display but not editing, 442–443transparency of, 443–447

LANs (local area networks), 19Leading, typographic, 1157–1158Letter Recognizer, Pocket PC input

method, 351Libraries

allocation and cleanup functions, 1317class library project, 646FontList sample library, 1138–1143graphical functions, 1037–1038native code, 562, 568.NET Compact Framework libraries,

80–81

Yao_VB.book.fm Page 1357 Friday, May 21, 2004 10:40 AM

Page 22: Index [ptgmedia.pearsoncmg.com]ptgmedia.pearsoncmg.com/images/0321174046/index/yaoindex.pdf · Connected approach, ADO.NET, 800–801 Connections database connectivity, 910–912

INDEX1358

Libraries, continuedPrinterCE, 1237–1240responding to missing, 13–14

Life game sample programcellular automation in, 698classes, 699–700object reuse and, 705overview of, 693

ListBox controlcomplex data binding and, 489–490overview of, 450–455PMEs, 451, 1281visual comparison with ComboBox con-

trol, 451ListView control, 1282Literal strings, 149–150LoadProject routine, 436local area networks (LANs), 19Local input state, 422–423Locked property

Form class, 267–268Visual Studio Designer, 85

Logical drawing model, 1216–1218LostFocus, 413–414, 642LPT ports, 1199

MMain forms, user interface, 602Main windows, user interface, 602MainMenu class, 56Managed code

ActiveSync and, 959–960, 962callback functions, 1138communicating with unmanaged, 190,

251–255compared with unmanaged, 22, 191custom controls and, 629defined, 1328garbage collection pools and, 170–172getting messages into, 581–585JITted code and, 168–170

metadata maps, 168porting unmanaged code to, 196–197scope of, 167

Manifest resources, 1081Manual garbage collection, 1313Manual memory management, 185–186,

1328Manual parameter marshaling, 238–250

allocating unmanaged memory, 241–244copying to unmanaged memory, 244–246creating objects from unmanaged

memory, 247–250defined, 1328Marshal class and, 239–241overview of, 238–239

Mappinganisotropic, 691registry types to managed types, 776–778

Marshal class, 239–241, 246, 996–997MarshalAs attribute, 198, 259Marshaling

automatic, 239data types, 211–213defined, 1328–1329manual, 239String class, 247

Matching binding, 819, 821–822MaxValue property, DateBox, 656MeasureString method, 1155–1156, 1159MeasureString sample program, 1156–1158Memory cards, 248, 982Memory leaks, 171, 1329Memory management, 167–186. See also

RAMallocation functions, 1032–1033, 1318cleanup functions, 1318managed memory, 167manual management of native data,

185–186memory leaks, 171, 1329unmanaged memory, 241–244, 1148

Yao_VB.book.fm Page 1358 Friday, May 21, 2004 10:40 AM

Page 23: Index [ptgmedia.pearsoncmg.com]ptgmedia.pearsoncmg.com/images/0321174046/index/yaoindex.pdf · Connected approach, ADO.NET, 800–801 Connections database connectivity, 910–912

INDEX 1359

Memory-resident databases, 795–796MemoryStatus function, 220–223Menu separators, 556Menus

adding separators to, 556allocation and cleanup functions, 1318classes, 586compared with other controls, 553–554context menus, 559–566overview of, 550program menus, 553–559renaming, 556–557sample application, 557–559Start menu, 550–553states, 555

Merge Replication, 931–947avoiding synchronization failures,

932–935capabilities of, 907compared with RDA, 918, 932, 946–947configuring, 938–939creating publication for, 1300–1311data synchronization with, 942–943defined, 1329modifying data at remote device, 943–946overview of, 931–932programming for, 941–942remote connectivity and, 908–909subscribing to a publication, 941–942virtual directory for, 1297–1300Web servers, 908

Message loops, 311Message pump, 311Message values, 584MessageBox function, 199–201MessageWindow class, 251–254, 568,

581–585Metadata

defined, 1329maps, 168

Metafiles

allocation and cleanup functions, 1318drawing surfaces, 1043not supported in .NET Compact Frame-

work, 1075–1076overview of, 1041

Methods. See also Properties, Methods, & Events (PMEs)

adding to forms, 279controls, 420–423coordinate conversion, 421custom controls, 635–639DataGrid, 499–500, 501defined, 1329forms, 273–274, 276in .NET type system, 132object cleanup, 421object-oriented programming, 130overriding methods that raise events,

639–640SIP, 350–352strings, 150–151thread-safe function calls, 421vector graphics, 1099visibility, 423z-ordering, 422

MFC library, 15Microsoft

initiatives, 32–33role of COM and Win32, 3SQL Server. See SQL ServerSQL Server 2000 CE Edition. See SQL

Server 2000 CE EditionMicrosoft Mobile Internet Toolkit, 1329Microsoft.Win32 class, 1262Microsoft.WindowsCE.Forms, 1264MinimizeBox property, Pocket PC, 287MinValue property, DateBox, 656MIS See Mobile Information ServerMobile data, 905–947

database connectivity and, 910–912IIS connectivity and, 909–910

Yao_VB.book.fm Page 1359 Friday, May 21, 2004 10:40 AM

Page 24: Index [ptgmedia.pearsoncmg.com]ptgmedia.pearsoncmg.com/images/0321174046/index/yaoindex.pdf · Connected approach, ADO.NET, 800–801 Connections database connectivity, 910–912

INDEX1360

Mobile data, continuedinstalling remote data connectivity,

912–918mechanisms for moving data and

schema between SQL Server CE and SQL Server, 908–909

Merge Replication approach. See Merge Replication

RDA approach. See Remote Data Access (RDA)

remote data applications, 906–908Mobile devices

ADO.NET classes and, 799HP Mobile Printing, 1227–1234printing and, 1179–1180

Mobile Information Server (MIS), 956Mobility, 53–55Modules

defined, 1329design goals and, 11–14Windows CE, 11

The Mono Project, 31Mouse input

automatic mouse capture, 330collecting points for rectangles, 338–340containers for mouse events, 396control support for, 320–325controls, 318–320cursor settings, 344–347debugging, 341–343drawing rectangles, 340–341DrawRectangles sample program, 333–338echoing mouse coordinates, 341–343emulator support for, 346–347event handlers, 330–333mouse events, 329–330overview of, 316–317Paint events, 343–344

mprint.dll, 1230MSIL. See Common Intermediate

Language (CIL)

Multi-item controls, 398–399, 487MultiThread sample program, 711–719Multithreaded environment

forms, 295–297main thread, 707passing data between threads, 708–709queues for threads, 709–710RAPI startup, 973–981service threads, 707

Mutex, 255, 1318

NName decorating, 235, 1329Name mangling, 235, 1329Named colors

brushes, 1072list of, 1069overview of, 1065pens, 1100–1101raster graphics, 1068–1069

Named fontscreating, 1132–1135font enumeration, 1135–1136

NamedFonts sample program, 1132–1133Names. See also Hungarian notation

controls, 556–557installable file system, 984menus, 556–557.NET naming guidelines, 1252–1255program elements, 96variables, 439

Namespacesaccessing, 133ADO.NET, 802–805benefits of, 121–122changing/overriding, 122class definitions and, 123compared with assemblies, 134controls, 390conventions for, 123–125defined, 1330

Yao_VB.book.fm Page 1360 Friday, May 21, 2004 10:40 AM

Page 25: Index [ptgmedia.pearsoncmg.com]ptgmedia.pearsoncmg.com/images/0321174046/index/yaoindex.pdf · Connected approach, ADO.NET, 800–801 Connections database connectivity, 910–912

INDEX 1361

graphical output, 1045, 1047in .NET type system, 132structure and organization of, 43type content and, 131–133

Native data. See also Unmanaged codemanual management of, 185–186mapping, 775

Native image cache, 45, 1330Native windows classes, 628–629.NET code. See Managed code.NET Compact Framework

ADO.NET elements supported, 70–72ambient properties, 1125application classes supported, 67–69building on .NET Framework, 51capabilities of, 64COM interoperability and, 66–67compared with .NET Framework, 255compilers, 47consistency with desktop, 51–53controls based on .NET Framework, 389CPU independence and, 55custom controls, 720defined, 1321design goals, 48–51disk space requirements, 10drawing surfaces supported, 1043elements of, 3, 48events supported, 320–321exposing richness of target platforms,

55–56files, 57–62graphical output, 69–70, 1039–1040implementation details, 259–260libraries, 80–81limitations of, 75–77limitations of ADO.NET in, 800mobile and embedded devices, 53–55named colors, 1069network classes supported, 20OpenNETCF Web site, 77

P/Invoke support, 255–260PME support, 547–550Pocket PC support, 6–7portability, 56–57preserving look and feel of platforms, 56programs in .NET Framework, 549–550property databases and, 741runtime elements supported, 65–67shared libraries in GAC, 62–64subset of events in, 323synchronizing mobile data, 906–907system colors, 1066text drawing support, 1118validation, 410–411Win32 API functions compared with

.NET Compact Framework classes, 195–196

Windows CE and, 49workarounds for desktop programmers,

435XML support, 72–75

.NET Frameworkapplication classes, 36–38basing .NET Compact Framework con-

trols on, 389Common Intermediate Language and,

43–45Common Language Infrastructure and,

48Common Language Runtime and, 46Common Language Specification and,

46–47common type system, 48compared with .NET Compact Frame-

work, 255consistency of .NET Compact Frame-

work with desktop of, 51–53defined, 1321graphical device drivers and, 1039implementations, 30–31.NET Compact Framework built on, 51

Yao_VB.book.fm Page 1361 Friday, May 21, 2004 10:40 AM

Page 26: Index [ptgmedia.pearsoncmg.com]ptgmedia.pearsoncmg.com/images/0321174046/index/yaoindex.pdf · Connected approach, ADO.NET, 800–801 Connections database connectivity, 910–912

INDEX1362

.NET Framework, continuedoverloads, 977–978overview of, 29–30P/Invoke support in, 210parameters compared with Win32

parameters, 995programming elements common to, 40–41running .NET Compact Framework

program in, 549–550scale of, 31–33scope of, 34–36support for installation of, 959–960validation, 410–411Web services, 38–40well-designed programming interface,

41–43.NET Remoting, 75, 960Network classes, supported by .NET Com-

pact Framework, 20Network printers, 1212–1214new function, 277New, File dialog boxes, 605ngen.exe, 75Non-client area, 1330Non-deterministic garbage collection, 144,

404, 1330Nonprintable keys, event sequences, 358–359Nonvolatile data storage, 743Numeric conversion

converting strings to numbers, 160–161exception handling, 159–160explicit, 158overflow exceptions, 158–159overview of, 157–161

Numeric formats, 162–163Numeric values, 400NumericUpDown control, 1283

OOAL (OEM Adaptation Layer), 1330Object classes, 115–116, 630

Object Linking and Embedding (OLE), 4–5, 1330

Object storeaccessing with RAPI. See Remote API

(RAPI), accessing object storedefined, 1330RAPI functions, 967types of objects stored in, 740

Object-oriented programmingcustom controls and, 627–628.NET Framework, 43overview of, 130

ObjectsBinaryWriter/BinaryReader objects,

752–753bindable data, 482–487classes, 115–116, 630cleanup, 421controls as, 387–389, 627converting value types to, 164–167creating form unmanaged memory,

247–250forms as, 267object-oriented programming, 130reuse in custom controls, 705

OEM Adaptation Layer (OAL), 1330Off-screen-bitmaps, 1073Offset for the nonprintable area, 1219OLE (Object Linking and Embedding),

4–5, 1330OnLostFocus method, 642OnPaint event, 702Open, File dialog boxes, 605OpenNETCF Web site, 77Operators, string, 150–151Optimistic Concurrency, 886–887, 919–920Options dialog box

controlling, 617–622creating, 615–616displaying and responding to, 615–616without SIP, 610

Yao_VB.book.fm Page 1362 Friday, May 21, 2004 10:40 AM

Page 27: Index [ptgmedia.pearsoncmg.com]ptgmedia.pearsoncmg.com/images/0321174046/index/yaoindex.pdf · Connected approach, ADO.NET, 800–801 Connections database connectivity, 910–912

INDEX 1363

Orphaned forms, 285–287, 290Overflow exceptions, 158–159Overloads. See Function overloadingOverrides keyword, 370–371Overriding

base event handler, 640–642control properties and methods,

635–636drawing in custom controls, 687–688methods that raise events, 639–640OnPaint event, 702

Owner-draw support, 1056–1057, 1331

PP/Invoke

debugging tip for, 198declarations. See P/Invoke wrappersdefined, 1331managed vs. unmanaged code and,

196–197, 251–255.NET Compact Framework classes vs.

Win32 functions, 195–196.NET Compact Framework support, 66,

255–260overview of, 189–192types not supported in structures, 219when to use, 192–195Win32 clipboard support, 562–566

P/Invoke function parametersarrays, 226–229boolean data types, 212, 214data structures, 216–223data types sample programs, 229–233limits of passing, 210–211manual parameter passing, 238–250reference types, 225–226signed vs. unsigned integers, 214simple data types, 211–212string parameters passed by value, 216uses of, 211value types, 225

by value vs. by refence, 214–215Win32 DLL, creating, 234–238

P/Invoke Wizarddefined, 1331overview of, 208–209

P/Invoke wrappersaccessing ActiveSync from managed

code, 959accessing property databases, 741–742CeCreateProcess, 1024–1025C-style, 206–208custom controls as wrappers around

native windows classes, 628–629debugging tip for, 198elements of, 197MessageBox function, 199–201overview of, 189P/Invoke Wizard, 208–209for RAPI registry query functions, 1003registry access by, 774, 775–776return values of functions, 206unmanaged functions, 202–205

Page boundaries, print jobs, 1220Page Description Languages (PDLs)

Adobe Postscript, 1184–1185defined, 1331overview of, 1182–1183PCL, 1183–1184

Paint events, 1059–1062accessing graphics objects, 1055,

1057–1058drawing in a window with, 1059,

1061–1062drawing in custom controls and, 688event handler for SimpleDrawString

program, 1122generating, 1059–1060non-paint event drawing, 1062–1063overview of, 343–344Paint Event Handler method, 341problems with, 1061

Yao_VB.book.fm Page 1363 Friday, May 21, 2004 10:40 AM

Page 28: Index [ptgmedia.pearsoncmg.com]ptgmedia.pearsoncmg.com/images/0321174046/index/yaoindex.pdf · Connected approach, ADO.NET, 800–801 Connections database connectivity, 910–912

INDEX1364

PAL (Platform Adaptation Layer), 57Palette function, 1222, 1318Panel control, 1284PANs (personal area networks), 19Paperless office, 1179Parallel ports, 1185Parent controls, 395–396Parent/child, control properties, 415–417ParentChanged, control events, 408–409Parsing data, 493–496Partitions, Windows CE, 984Partner devices, ActiveSync, 951–953Pass by reference. See By-ReferencePass by value. See By-ValuePass-Through support, 950, 1331PATH variable, 745PCL. See Printer Control Language (PCL)PDLs. See Page Description Languages

(PDLs)Pens

allocation and cleanup functions, 1319defining, 1100GDI pen functions, 1222overview of, 1331types supported, 1100–1101vector graphics, 1045

Performancetext drawing and, 1123impact of file

dialog boxes on, 605Persistent data stores, 795–796Personal area networks (PANs), 19Photographs, 1073PictureBox control, 1285PIE (Pocket Internet Explorer), 49, 68Pixels. See also Bitmaps

as coordinate system, 691measuring text height, 1243minimizing flicker and, 701raster graphics and, 1044

Platform Adaptation Layer (PAL), 57Platform Builder

building applications with, 23–24creating OS images with, 740defined, 1331developer tool, 1000packing Windows CE as ROM image,

744range of elements in, 23Windows CE modularity and, 11–12

Platform Invoke. See P/InvokePlatforms

defined, 1331exposing richness of, 55–56, 393preserving look and feel of, 56, 393–394Windows CE, 23–24

PMEs. See Properties, Methods, & Events (PMEs)

PNG filescompression, 1086creating bitmaps from, 1079defined, 1331as image format, 594

Pocket Excel, 1192Pocket Internet Explorer (PIE), 49, 68Pocket Outlook, 1229–1230Pocket PC

ActiveSync, 1187ActiveSync Pass Through, 950building .NET Compact Framework

programs for, 104–105device buttons, 350, 359–361dialog boxes, 608–610docking cradles, 950–951emulator support for mouse input and

cursors, 346–347external keyboards, 610font support, 1124, 1126form display on, 85forms, 266HP Mobile printing, 1228–1230input devices, 310input methods, 351

Yao_VB.book.fm Page 1364 Friday, May 21, 2004 10:40 AM

Page 29: Index [ptgmedia.pearsoncmg.com]ptgmedia.pearsoncmg.com/images/0321174046/index/yaoindex.pdf · Connected approach, ADO.NET, 800–801 Connections database connectivity, 910–912

INDEX 1365

installable file systems, 743iPaq, 1227keyboards, 353mapping buttons to key code values, 373menus, 592MinimizeBox property, 287.NET Compact Framework support for,

6–7OS, 7platforms, 23ports, 1186–1187power states, 742Print dialog box, 1199printing support, 1179–1180, 1192,

1198–1199program menu, 553removable storage media, 739sleep state, 381–383start menu, 550–552task list problem, 613–614toolbars, 592versions, 7Windows CE platform, 6

Pocket Word, 608–609, 1192Point, 1332Pointing devices, 307. See also Input

devicesPoint-to-point message queue, 255Pop-up menus. See Context menusPortability

defined, 1332.NET Compact Framework, 56–57Windows CE design goals, 14–17

Portsin PrintDirect program, 1210–1211PrinterCE, 1236printers, 1185–1186in Registry, 1199

Positional, control properties, 418–419Postscript, Adobe, 1184–1185Power management, 742

Print dialog box, 1199–1205, 1210Print jobs

defined, 1181overview of, 1188–1189page boundaries, 1220

Printable character keys, 357–358PrintDirect sample program, 1209–1214

connecting to network printers, 1212–1214

overview of, 1193–1194Print dialog box in, 1210printer ports in, 1210–1211pros/cons, 1197timing tests for, 1194–1197

Printer Control Language (PCL)direct printing to PCL printer, 1207–1208overview of, 1183–1184text command codes for PCL printers,

1208Printer dongles, 1236PrinterCE, 1235–1246

classes, 1237coordinate attributes, 1239drawing attributes, 1240drawing functions, 1239font size selection, 1240–1241library, 1237–1240overview of, 1235–1237PrintField sample program, 1242–1246printing functions, 1238Query properties, 1238text height in ems, 1243

Printersdefined, 1181drawing surfaces, 1042network printers, 1212–1214overview of, 1182PDLs, 1182–1183ports, 1185

PrintField sample program, 1194–1197, 1242–1246

Yao_VB.book.fm Page 1365 Friday, May 21, 2004 10:40 AM

Page 30: Index [ptgmedia.pearsoncmg.com]ptgmedia.pearsoncmg.com/images/0321174046/index/yaoindex.pdf · Connected approach, ADO.NET, 800–801 Connections database connectivity, 910–912

INDEX1366

PrintGDI sample program, 1223–1227overview of, 1193–1194printing speed of, 1197timing tests for, 1194–1197

PrintHPMobile sample program, 1233–1234

overview of, 1193–1194printing speed of, 1197timing tests for, 1194–1197

Printing, 1179–1246Adobe Postscript, 1184–1185direct printing, 1205–1208elements of printing pipeline, 1181GDI printing and drawing functions,

1219–1221graphic subsystem for, 1189–1191HP Mobile. See HP Mobile PrintingI/O channel for, 1185–1188overview of, 1179–1180PCL, 1183–1184PDLs, 1182–1183Pocket PC support for, 1198–1199Print dialog box, 1199–1205print jobs, 1188–1189PrintDirect sample program, 1193–1198,

1209–1214PrinterCE library. See PrinterCEprinters, 1182PrintField sample program, 1193–1198PrintGDI, 1193–1198PrintGDI sample program, 1223–1227PrintHPMobile sample program,

1193–1198printing programs, 1191–1192programs for printing support,

1192–1193Printing functions

GDI, 1219–1221PrinterCE, 1238

Printing pipeline, 1181, 1195

Printing programsbackground threads and, 1191defined, 1181mapping to printing pipeline model, 1195overview of, 1191–1192

Private data, 1257–1259Processes

allocation and cleanup functions, 1319defined, 1332

Profiling, 985Program memory, 740Program menus, 553–559

classes supporting, 556merging with toolbar buttons, 585–586overview of, 553ProgramMenu sample application,

557–559Programming elements, .NET Framework

Common Intermediate Language, 43–45Common Language Infrastructure, 48Common Language Runtime, 46Common Language Specification, 46–47Common Type System, 48overview of, 40–41well-designed programming interface,

41–43Programs. See ApplicationsProgressBar control, 1286Properties. See also Properties, Methods, &

Events (PMEs)adding to forms, 279ambient, 295control state properties, 419–420custom controls, 635–639database for devices, 1011–1015data-binding properties, 419DataGrid control, 498–499, 501dialog boxes, 604forms, 268–272Hungarian notation, 96

Yao_VB.book.fm Page 1366 Friday, May 21, 2004 10:40 AM

Page 31: Index [ptgmedia.pearsoncmg.com]ptgmedia.pearsoncmg.com/images/0321174046/index/yaoindex.pdf · Connected approach, ADO.NET, 800–801 Connections database connectivity, 910–912

INDEX 1367

parent/child properties, 415–417positional properties, 418–419strings, 150–151TaskStatus, 689–692ToolBar control, 587viewing control properties, 409well-behaved, 667–668

Properties, Methods, & Events (PMEs), 1271–1295. See also Events; Methods; Properties

Button class, 1274Button control, 456CheckBox class, 1275ComboBox class, 1276composite controls, 680Control class, 428–431, 1273ControlPME utility, 548–549custom controls, 630–643data binding and, 1273DataGrid class, 498–501, 1277defined, 1271, 1332detecting support for, 547–550DomainUpDown class, 1278Form class, 268HScrollBar class, 1279Label class, 1280Label control, 441–442ListBox and ComboBox controls, 451ListBox class, 1281ListView class, 1282.NET Framework vs. .NET Compact

Framework, 427NumericUpDown class, 1283overview of, 401–402Panel class, 1284PictureBox class, 1285ProgressBar class, 1286RadioButton class, 1287simple data binding, 491StatusBar class, 1288

TabControl class, 1289TabPage class, 1290TextBox class, 1291TextBox control, 448ToolBar class, 588, 1292TrackBar class, 1293TreeView class, 1294VScrollBar class, 1295

Property assessors, 639Property databases

defined, 1332RAPI functions, 966–967RAPI names for property database

functions, 961record-based data storage, 741–742

Property values, 733–734Protocols

network protocols, 20Security protocols, 20

Provider-independent classes, ADO.NET, 799, 802

Provider-specific classes, ADO.NET, 799, 802

Public properties, 483Publications, Merge Replication

articles of publication, 932Create Publication Wizard, 938,

1300–1311design of, 936–937subscribing to, 941–942synchronizing data in, 942–943

Publisher, Merge Replication, 932Pull method, RDA, 921–927

IDENTITY property and, 923–924modifying pulled data at local device,

925–927overview of, 921–923viewing pulled schema, 924–925

Push method, RDA, 927–930PushButton, 591

Yao_VB.book.fm Page 1367 Friday, May 21, 2004 10:40 AM

Page 32: Index [ptgmedia.pearsoncmg.com]ptgmedia.pearsoncmg.com/images/0321174046/index/yaoindex.pdf · Connected approach, ADO.NET, 800–801 Connections database connectivity, 910–912

INDEX1368

QQueries

GDI functions, 1218–1219, 1222schema information, 860–864viewing/creating with Query Analyzer,

835–837XML, 73

Query Analyzer, SQL Server 2000 CE Edition, 835–837

Query properties, PrinterCE, 1238Queue class, 709–710

RRadioButton control, 466–472

action-oriented vs. data oriented, 471–472

event handlers, 470–471PMEs, 1287positioning radio buttons, 470RegisterMembers sample program,

467–468working with radio buttons, 468–469

RAMfiles based in, 745–746mobility and, 54program memory and object store

components of, 740smart devices, 739volatility, 742Windows CE requirements, 10

RAPI. See Remote API (RAPI)Raster graphics, 1063–1098

Bitmap class, 1075–1076bitmap creation, 1073–1074, 1076–1078bitmap resources, 1080–1085bitmap roles, 1074–1075brush creation, 1071–1073color specification, 1064–1065compressed formats, 1043drawing bitmaps, 1086–1091as drawing function family, 1044–1045

Graphics class, 1051–1052image file sizes, 1085–1086named colors, 1068–1069.NET Compact Framework, 69–70overview of, 1063–1064RGB color, 1068, 1070–1071ShowBitmap sample program, 1091–1099system colors, 1065–1067

RDA. See Remote Data Access (RDA)Reachable data, 1332Reading/writing classes, 749–753Real time programming, Windows CE,

20–22Recipients, of function calls, 978–979Rectangles

collecting points for, 338–340drawing, 340–341DrawRectangles sample program,

333–338filling, 1064

Red, green, blue values. See RGB valuesReference types, CTS

comparing with value types, 145declaring, initializing, and allocating,

144–146defined, 1332overview of, 142–144as parameters, 148, 225–226passing by reference, 214–215passing by value, 214–215, 224strings as, 152

Referencescomposite controls, 686object, 901–902project, 662

Reflection, 1332RegCreateKeyEx, 778regedit.exe, 774, 1000Regions

allocation and cleanup functions, 1319DataGrid control, 510

Yao_VB.book.fm Page 1368 Friday, May 21, 2004 10:40 AM

Page 33: Index [ptgmedia.pearsoncmg.com]ptgmedia.pearsoncmg.com/images/0321174046/index/yaoindex.pdf · Connected approach, ADO.NET, 800–801 Connections database connectivity, 910–912

INDEX 1369

GDI functions, 1222generating and creating, 98

RegisterMembers sample programcheck boxes, 472–477radio buttons, 467–468

Registry, 774–793allocation and cleanup functions, 1319data types supported, 776–777defined, 1333device entries, 999–1011function overloading and, 782–784opening keys, 774–775, 778–779overview of, 774P/Invoke wrappers, 775–776print drivers and ports, 1199RAPI functions, 965–966reading values, 779–781Storage sample application, 788–792utilities, 774utility classes, 784–788Windows CE, 76–77writing values, 781–782

RegQueryValueEx, 779RegSetValueEx, 781–782Remote API (RAPI)

allocation and cleanup functions, 1319based on ActiveSync, 949building ActiveSync applications, 962coding defensively, 981–982defined, 1333device-side programs, 1024–1026file system functions, 964–965loading programs and DLLs, 1024,

1026–1034multithreaded startup, 973–981.NET Remoting and, 960object store functions, 967overview of, 960–961program and DLL functions, 963property database functions, 966–967property databases and, 961

Registry functions, 965–966remote windowing functions, 969single-threaded startup, 971–973startup and shutdown, 969–971support functions, 963system information functions, 967

Remote API (RAPI), accessing object storedevice file access, 983–986finding files in device file system,

987–992finding files in device file system faster,

992–999installed file system names, 984overview of, 982–983remote access to device properties

database, 1011–1015remote access to device registry entries,

999–1011Remote Data Access (RDA), 918–931

capabilities of, 907, 918–920compared with Merge Replication, 918,

932, 946–947defined, 1333overhead of, 918–920programming for, 920–921pulling data, 921–927pushing data, 927–929remote connectivity and, 908–909SubmitSQL method, 930–931virtual directory, 1297–1300Web servers, 908

Remote data applications, 906–908Remote data connectivity, 912–918Remote devices, 943–946Remote procedure calls (RPCs), 39, 957Remote Registry Editors, 774, 1001Remote SPY++, 1333Remote Tools, 1333Remote windowing, 969Remote Zooming, 1333Removable media, 984

Yao_VB.book.fm Page 1369 Friday, May 21, 2004 10:40 AM

Page 34: Index [ptgmedia.pearsoncmg.com]ptgmedia.pearsoncmg.com/images/0321174046/index/yaoindex.pdf · Connected approach, ADO.NET, 800–801 Connections database connectivity, 910–912

INDEX1370

Replication. See Merge ReplicationResources

allocation and cleanup functions, 1319defined, 1333location of, 1080overview of, 1079–1080typed, 1080–1081untyped, 1081–1085

RGB valuesblack, 1070brushes, 1073image formats and, 594overview of, 1065pens, 1100–1101raster graphics, 1068, 1070–1071triplets of common colors, 1070white, 1070

ROMfiles based in, 744–745Windows CE requirements, 10

RotateText sample program, 1150–1154Rows. See DataRow classRPCs (remote procedure calls), 39, 957Runtime

creating controls at, 110–113vs. design time programming, 508elements supported by .NET Compact

Framework, 65–67styles created at, 508–510

SSave As, File dialog boxes, 605Save, File dialog boxes, 605SAX (Simple API for XML), 73–74Scale, .NET Framework, 31–33Schema information, 860–864Scope

managed code, 167.NET Framework, 34–36

Scroll bars, 622.sdf file extension, 830

SDK. See Software Development Kit (SDK)Search keys, 820, 824–825Secure Digital media, 739, 743Secure Sockets Layers (SSL), 898Security protocols, Windows CE, 20Select statements. See SQL statementsSemaphores, 1319Senders, of function calls, 979SendMessage function, 978Separators

adding to menus, 556on toolbar, 591

Serial connectionsIP networking and, 1017printer ports, 1185

Servers, ActiveSync, 955–956Service threads, 707Shared keyword, 202Shared libraries, 61, 62–64Shared methods

in Designer, 119–121Directory and File classes, 747DoEvents class, 311

Shared resources, 1055Shared source code, 23ShowBitmap sample program,

1091–1099formats supported, 1089–1091resources, 1092source code for, 1092–1099

Shutdown, RAPI, 969Signed integers, 214Simple API for XML (SAX), 73–74Simple data binding. See Data binding,

simpleSimple data types. See Value types, CTSSimple Object Access Protocol (SOAP)

defined, 1333SOAP messages, 896, 899SOAP Toolkit, 67structure of SOAP request, 895

Yao_VB.book.fm Page 1370 Friday, May 21, 2004 10:40 AM

Page 35: Index [ptgmedia.pearsoncmg.com]ptgmedia.pearsoncmg.com/images/0321174046/index/yaoindex.pdf · Connected approach, ADO.NET, 800–801 Connections database connectivity, 910–912

INDEX 1371

SimpleDrawString sample program, 1121–1122Web Services and, 38–39, 888–890

Single-item controls, 397–398, 487Single-threaded startup, RAPI, 971–973SIP. See Software Input Panel (SIP)Sleep sample program, 381–383Smallness

.NET Compact Framework and, 390

.NET Framework and, 54Windows CE design goals, 9–21

Small-screen devicesforms, 267interface for, 34–35

Smart Device Application Wizard, 84–85, 288–292

Smart devicesdrawing, 1045–1046eMbedded Visual C++ support for, 24–25input devices, 307mouse cursors, 344–345moving from desktop to, 53printing ports, 1186start menu, 550Windows CE support, 7

Smart-device data storage, 739–746file I/O. See File I/Oinstallable file systems, 743object store, 740overview of, 739–740property databases, 741–742RAM-based files, 745–746ROM-based files, 744–745storage cards, 984system power states, 742Windows CE file system, 743–744

Smartphonefont support, 1124input devices, 307.NET Compact Framework compatibility

with, 7

solitaire on, 309start menu, 550

SMS (Systems Management Server), 957SOAP. See Simple Object Access Protocol

(SOAP)Sockets, 1320Soft real-time requirements, 21Software Development Kit (SDK)

defined, 1333–1334HP Mobile printing, 1231–1233Windows CE, 12–13

Software Input Panel (SIP)defined, 1334dialog boxes, 609empty menu for availability of, 558input methods for character data,

350–352methods, 350–352Pocket PC and, 307relationship of toolbars to, 586requires a menu, 554responding to changes, 366–367

Solitaire, on Smartphone, 309Solution Explorer window, 89, 92Source code

basis of .NET Compact Framework programs, 81–82

portability, 16–17, 1334Source files, 722Speed, mobility and, 54SQL Server

command objects, 876–882compared with SQL Server CE, 832–835,

866–867concurrency protection, 886–887connecting to, 868–869IIS to SQL Server connections, 912mechanisms for moving data and schema

to/from SQL Server CE, 908–909overview of, 865–867stored procedures, 876–886

Yao_VB.book.fm Page 1371 Friday, May 21, 2004 10:40 AM

Page 36: Index [ptgmedia.pearsoncmg.com]ptgmedia.pearsoncmg.com/images/0321174046/index/yaoindex.pdf · Connected approach, ADO.NET, 800–801 Connections database connectivity, 910–912

INDEX1372

SQL Server 2000 CE Edition, 829–887ActiveSync, 910ANSI standard for, 834compared with SQL Server, 866–867creating databases, 837–839database access from native code, 830database connectivity and, 910–912database constraints, 834files, 830–831mechanisms for moving data and

schema to/from SQL Server, 908–909Microsoft support for Windows CE

devices, 955–956populating databases, 839–842Query Analyzer, 835–837querying schema information, 860–864retrieving and displaying database data,

843–851submitting SQL statements to databases,

839–842syntax, 832–835tasks, 830updating databases, 851–860

SQL Server Authentication mode, 912SQL Server CE Client Agent, 907, 910–912,

914SQL Server CE Server Agent, 910–912,

914SQL Server Connectivity Management,

915–917SQL statements

aliasing column names, 835creating, 860populating data tables, 811processing rows returned by, 849RDA pull, 921stored procedures in, 883submitting to databases, 800, 839–842updating databases and, 855

SqlCeCommand class, 839SqlCeConnection class, 839

SqlCeDataAdapter class, 853–860moving data between data sets and

databases, 853retrieving data, 853–855updating databases, 855–860

SqlCeDataReader class, 843–851SqlCeRemote-DataAccess, 920–921SqlCommand class, 876–882SqlConnection class, 868–875SqlServerCe namespace, 865SSL (Secure Sockets Layers), 898Stacks, 1334Standard types, 137Start menu, 550–553Startup

eliminating unnecessary start-up activities, 605

RAPI, 969Registry setting for, 1006–1007

Startup forms, 284States, menus, 555static keyword, 197StatusBar control, 1288Storage

extending storage space, 982file I/O. See File I/ORegistry. See Registrysmart devices. See Smart-device data

storageStorage sample application, 788–792

Stored procedures, 876–886benefits of, 876category modification with, 883–885example, 877executing, 878–882overview of, 876unavailable in SQL Server CE, 866using with DataSet class, 882–886

str parameter, DrawString method, 1120Stream classes, 749Stream interface drivers, 1007, 1334

Yao_VB.book.fm Page 1372 Friday, May 21, 2004 10:40 AM

Page 37: Index [ptgmedia.pearsoncmg.com]ptgmedia.pearsoncmg.com/images/0321174046/index/yaoindex.pdf · Connected approach, ADO.NET, 800–801 Connections database connectivity, 910–912

INDEX 1373

Stream mode, 1026–1027String conversion

Character set conversion, 163numeric formats, 162–163overview of, 160–161String.Format method, 163–164

String data types, 774, 776–777String.Format method, 163–164StringBuilder class, 153, 216Strings, 148–156

allocation and cleanup functions, 1320converting to numbers, 160–161immutability, 152–153, 666literal, 149–150overview of, 148passing by reference, 152passing by value, 152, 216properties, methods, and operators,

150–151resources, 154–156String data types, 774, 776–777StringBuilder class, 153

Strong Name, 1334Strongly typed data, 800StructLayout attribute, 257–258Structures. See Data structuresStyles, creating at runtime, 508–510Subcaption area, dialog boxes, 609Subclass procedure, 568Subclassing

defined, 1334event grabber and, 568–571event handlers compared with, 367to intercept Win32 messages, 571–581TextBox control, 367–368, 371–373Windows Forms Designer and, 369–370

SubmitSQL method, RDA, 930–931Subscribers, Merge Replication, 932Support, inheritance and, 325–327, 397, 547Synchronization. See Data synchronizationSynchronous (blocking), 981

Systemclasses, 1260–1261information, 967power states, 742timeout values, 383–385

System colorsbrushes, 1072list of, 1066–1067overview of, 1065pens, 1100–1101raster graphics, 1065–1067

System.Collection, 1262System.Collections.Queue, 709System.ComponentModel.Component,

629System.Data, 1265–1267System.Drawing

classes, 1050display screen, 1053DrawString method, 1118–1121graphical output, 1039–1040graphical programming interfaces,

1189Hungarian notation prefixes for,

1264–1265named colors, 1068printing support, 1200raster and vector drawing methods, 1052vector graphics, 1045–1046, 1099

System.IO, 1267–1268System.String class, 150System.Text, 1261System.Threading, 1268System.Windows.Forms, 267, 1262–1264System.Windows.Forms.Control, 629System.Windows.Forms.Form, 82–83, 298Systems Management Server (SMS), 957

TTabControl control, 1289TabPage control, 1290

Yao_VB.book.fm Page 1373 Friday, May 21, 2004 10:40 AM

Page 38: Index [ptgmedia.pearsoncmg.com]ptgmedia.pearsoncmg.com/images/0321174046/index/yaoindex.pdf · Connected approach, ADO.NET, 800–801 Connections database connectivity, 910–912

INDEX1374

Tabular data structuresbindable data and, 482DataGrid control and, 497table and column styles, 505–508

Task listPocketPC, 613–614as top-level window, 613

Task structure, 484–486Tasks, SQL Server 2000 CE Edition, 830TaskStatus control

display provided for, 689–692drawing routine, 691–692overview of, 680–683relationships between components,

683–686TCP/IP connections

ActiveSync, 1017mobile connectivity, 908

Testingcomposite controls, 686custom controls, 634–635custom controls for multithreaded

environment, 712–715DateBox control, 661–664design-time controls, 721

Text drawing, 1117–1177alignment of text, 1158–1159color of text, 1169–1170as drawing function family, 1044DrawString method, 1118–1121features and sample programs,

1119–1120font selection. See FontsGraphics class, 1051MeasureString sample program,

1156–1158.NET Compact Framework, 1118overview of, 1117–1118performance and, 1123placement of text, 1154–1155RotateText sample program, 1150–1154

SimpleDrawString sample program, 1121–1122

size of text, 1155–1156TextAlign sample program, 1159–1165TextColor sample program, 1170–1176word wrap, 1165–1166WordWrap sample program, 1166–1169

Text file I/O, 757–760Text height, in ems, 1243Text property, DateBox, 655–656TextAlign sample program, 1159–1165TextBox control

binding/unbinding tasks to, 495–496context menus and, 562–566extending as DateBox, 644in-place editing capability, automating,

534–545in-place editing capability, manual,

528–534list of PMEs, 448loading task fields into, 449–450PMEs, 1291subclassing, 367–368, 371–373text display and editing supported, 449

TextBoxClipboard sample program, 560–561

TextColor sample program, 1170–1176Threads

allocation and cleanup functions, 1320background, 1191consistent speed of, 700coordinating work between, 707–708defined, 1334main, 707relationship to windows, 296service, 707wrapper class, 717–719

Thread-safeControl.Invoke method, 978function calls, 421Invoke method and, 707

Yao_VB.book.fm Page 1374 Friday, May 21, 2004 10:40 AM

Page 39: Index [ptgmedia.pearsoncmg.com]ptgmedia.pearsoncmg.com/images/0321174046/index/yaoindex.pdf · Connected approach, ADO.NET, 800–801 Connections database connectivity, 910–912

INDEX 1375

Thunk, 1334–1335TIFF format, 1079Timeout values, system, 383–385Timer control, 400, 700Timers, 1320TimeTracker sample program

application interface for, 437–439event handlers, 439–441loading project and tasks, 436overview of, 432writing code for, 433–437

Today Screen, 1334ToggleButton, 591Toolbar buttons

bitmaps and, 591compared with Button control, 587compared with regular buttons, 596creating, 590–591merging with menus, 585–586size of, 592types of, 591

ToolBar control, 585–592adding graphical images with,

585–587buttons, 587, 590–592PMEs, 588, 1292relationship of toolbars to SIP, 586ToolBar sample program, 595–601

ToolBar sample program, 595–601Toolbox

controls in, 99obstacles to putting custom controls in,

720TopLevel property, 416Top-level window, 613Touch screens, 307–308TrackBar control, 1293Tracking forms, 292–294Transparency, of Label control, 443–447TreeView control, 1294Triggers, SQL Server, 931

TrueType fontsexternal leading, 1158fixed-pitch vs. variable-pitch, 1118for PocketPC, 1132supported by Windows CE, 1123–1124Windows CE support for, 69

try keyword, 982Type conversion, 156–167

casting, as used in C programs 782CType( ) vs. DirectCast( ), 166numeric conversion, 157–161overview of, 156–157string conversion, 161–164values to objects, 164–167

Type system. See Common type system (CTS)

Typecasting controls, 424–425Typed resources, 1080–1081

UUnboxing, 165, 1335Unicode character set

converting to other character sets, 753limitations of .NET Compact Frame-

work, 75–76overview of, 364type conversion, 163

Unified type system. See Common type system (CTS)

Unmanaged codecommunicating with managed, 251–255compared with managed, 191creating fonts in, 1144–1148database access from, 830defined, 1330drawing with fonts, 1149fonts, 1144–1150garbage collection, 1149–1150library, 562, 568vs. managed code, 22, 190manual management of, 185–186

Yao_VB.book.fm Page 1375 Friday, May 21, 2004 10:40 AM

Page 40: Index [ptgmedia.pearsoncmg.com]ptgmedia.pearsoncmg.com/images/0321174046/index/yaoindex.pdf · Connected approach, ADO.NET, 800–801 Connections database connectivity, 910–912

INDEX1376

Unmanaged code, continuedoverview of, 172–173P/Invoke and, 190porting to managed, 196–197

Unmanaged functionsdetails of, 202–205parameters for, 210return values, 206

Unmanaged memoryallocating, 241–244, 1148copying to, 244–246creating objects from, 247–250

Unmanaged threads, 174, 1335Unreachable Objects, 1335Unsigned integers, 214Untyped resources, 1081–1085Updating databases, SQL Server 2000 CE

Edition, 851–860Usage classes, 1260–1261USB connections

IP networking and, 1017printer ports, 1185–1186

User input, DataGrid control, 510–515User interface

custom dialog boxes, 607–608multithreaded environments and, 719role of dialog boxes in, 601–602threads, 296

Utility classes, Registry, 784–788Utility routines, ADO.NET, 808

VValidated control event, 409–413, 642,

649–650Validating control event, 409–413, 640–641,

649–650, 658, 683–685Validating/filtering incoming data, 649–650Value types, CTS

comparing with reference types, 145converting to objects, 164–167data structures, 140–141

declaring, initializing, and allocating, 144–146

defined, 1335immutability, 667integer and floating-point, 139–140overview of, 137–139as parameters, 147, 225passing parameters by reference, 214–215passing parameters by value, 214–215, 224strings as, 152

Valuesreading Registry values, 779–781writing Registry values, 781–782

Variables, naming, 439Vector graphics

as drawing function family, 1045Graphics class, 1051–1052JasperDots game, 1101–1114methods, 1099.NET Compact Framework and, 70overview of, 1098–1099pen creation, 1100–1101

Version numbers, freezes during testing, 722

Views. See DataView classVirtual consoles, 1041Virtual Directory Creation Wizard,

1297–1300Virtual directory, IIS, 912–917Visibility, control methods, 423Visible property, 314, 419–420, 423Visual Basic

eMbedded Visual Basic, 15Forms collection, 292interoperability with C#, 214user-defined types, 141

Visual Basic.NETcomparing eMbedded Visual Basic with,

16function overloading, 782lack of Forms collection in, 292

Yao_VB.book.fm Page 1376 Friday, May 21, 2004 10:40 AM

Page 41: Index [ptgmedia.pearsoncmg.com]ptgmedia.pearsoncmg.com/images/0321174046/index/yaoindex.pdf · Connected approach, ADO.NET, 800–801 Connections database connectivity, 910–912

INDEX 1377

Visual inheritance, 298Visual numeric value controls, 400Visual Studio

building and installing design-time control, 729–733

defined, 1335Designer. See Designerdesign-time control added to toolbox,

722–723development environment windows,

89–92development process for custom

control, 724file generation, 85freezing version numbers during testing,

722obstacles to putting custom controls in

Toolbox, 719–734project types, 83–85property values of custom control,

733–734setup example of custom control,

724–729setup process for custom control,

723–724starting, 83troubleshooting tips for custom control,

731–732Volatile data storage, 742. See also RAMVScrollBar control, 1295

WWANs (wide area networks), 19Warm boots, 742WaterBox object, 673–678WaterMath class, 116–117, 119WaterTemp sample program

capabilities of, 664code for, 668–673design decisions for, 665–667

Weak references, 184–185, 290

Weather sample program, 288–294Web Forms applications

ADO.NET classes and, 798–799as .NET application class, 36–37operating systems hosting, 68

Web servers, 908Web Services, 887–903

ADO.NET classes and, 798–799client applications, 899–903compared with ActiveSync, 957–958creating, 890–899defined, 1335Global.asax and, 897–898as .NET application class, 38–40.NET Compact Framework, 67overview of, 887–888WSDL, 893–894XML, XSD, and SOAP, 888–890

Web Services Description Language (WSDL), 893–894

Web sites, 889Well connectedness, Windows CE, 19–20White, RGB values, 1070Wide area networks (WANs), 19Widening conversions, 157Wi-Fi, 1186–1188Win16 API, 3–4Win32 API

allocation and cleanup functions, 1313–1320

caret functions, 377clipboard support, 562–566custom controls as wrappers around

Win32 controls, 629defined, 1335design flaws, 41–42font enumeration DLL, 1138HRESULT values, 970input, 317–318keybd_event function, 353–354memory allocation, 1032–1033

Yao_VB.book.fm Page 1377 Friday, May 21, 2004 10:40 AM

Page 42: Index [ptgmedia.pearsoncmg.com]ptgmedia.pearsoncmg.com/images/0321174046/index/yaoindex.pdf · Connected approach, ADO.NET, 800–801 Connections database connectivity, 910–912

INDEX1378

Win32 API, continuedparameters compared with .NET

parameters, 995passing structure to Win32 functions,

217–219pointers, 221relationship of messages to events, 404role in Microsoft strategy, 3setting mouse cursor, 347–349subclassing to intercept Win32 messages,

571–581Visible property, 420Win32 functions compared with .NET

Compact Framework classes, 195–196Windows CE and, 4–5

Win32 DLL, 234–238Window

clipping, 1041foreground, 312–313forms and controls, 312invalid, 1059–1060

Window procedure, 568Windows Authentication, SQL Server,

912Windows CE

ActiveSync and, 950–951compared with desktop Windows

versions, 255compatibility, 18–19data synchronization, 798defined, 1336design goals, 8–9development tools, 24–25device drivers, 15dialog boxes, 603–604DIB support, 1042disk space requirements, 9–10drawing coordinates, 1216drawing surfaces, 1043eMbedded Visual C++ and, 25–29file system, 743–744, 982font support, 1123–1124, 1126

GDI functions, 1038–1039, 1218GDI library lacking in, 1215IL-compatible platform, 45infrared ports, 1186input devices, 317–318, 353installable file systems, 743memory leaks, 171menus, 550Microsoft support for Windows CE

devices, 955–956modularity, 11–14.NET Compact Framework and, 49network debugging for, 986overview of, 6–8platforms, 23–24portability, 14–17print drivers, 1205PrinterCE and, 1235–1236printers, 1042property databases, 741–742RAM, 740RAPI. See Remote API (RAPI)raster graphics, 1044–1045real time programming, 20–22Registry, 774running programs on, 86–88smallness, 9–10, 390smart devices, 7, 743–744start menu, 551–552startup lists, 1006storage, 739tools for developers, 1000Unicode character set, 364unmanaged DLLs in, 233–234well connectedness, 19–20Win32 API and, 4–5, 317–318

windows directory, 744–745Windows Forms applications

ADO.NET classes and, 798–799as .NET application class, 36–37supported by .NET Compact

Framework, 67

Yao_VB.book.fm Page 1378 Friday, May 21, 2004 10:40 AM

Page 43: Index [ptgmedia.pearsoncmg.com]ptgmedia.pearsoncmg.com/images/0321174046/index/yaoindex.pdf · Connected approach, ADO.NET, 800–801 Connections database connectivity, 910–912

INDEX 1379

Windows Forms Designer, 369–370, See Designer

Windows Mobile, 1336Windows sandwich, 1336Wireless networks

ActiveSync and, 1017protocols for, 1186

WM_HIBERNATE message, 176–177Word processing, 1165Word wrap, 622, 1165–1169Word-wrap rectangle, 1166WordWrap sample program, 1166–1169Working Set, 1336Wrappers. See P/Invoke wrappersWSDL (Web Services Description

Language), 893–894

XXIP (eXecute In Place), 744, 1326XML, 766–773

compared with binary file I/O, 771limitations of, 898–899

nested elements, 767queries, 73reading/writing data sets as, 827–829routine for reading/writing to files,

767–773support in .NET Compact Framework,

72–75text-based format, 766as Web service, 888–890XSL transformations, 74

XmlReader/Writer, 752, 767XSD, 888–890XSL (eXtensible Stylesheet Language), 74

ZZ-ordering, 422, 1336

Yao_VB.book.fm Page 1379 Friday, May 21, 2004 10:40 AM