"If you're interested in developing for this burgeoning platform, there is no one better able to get you up-to-speed."
-From the Foreword by Rob Tiffany, mobility architect, Microsoft
"Each day it seems that mobile devices are becoming more common and critical to our everyday lives. As more developers target this growing market, the need for a trusted guide grows, and this book provides that guidance. The authors have reached a rare balance in which they provide the core knowledge required to start the journey of mobile development as well as the depth to support a seasoned developer. Every developer building applications for Windows Mobile devices should have this book close at hand to guide them through the challenges and rewards of creating their applications."
-Mike Erickson, principal consultant, Neudesic
"This is one of the most complete technical books available on developing smart-device applications with Visual Studio and the Compact Framework 3.5. It covers many necessary topics, from preserving battery life to communicating with the outside world using WCF and everything in between. Whether you have been developing in the Compact Framework for years or are just getting started, this book has something in it for you."
-Jason Estes, senior software engineer, Itron
"This book arms Windows Mobile developers with the core knowledge they need for building rich business and personal applications. It also gives them great insight into what is going on under the covers, how the platform is unique compared to other versions of Windows, and how to build robust Windows Mobile applications productively."
-Brian Noyes, chief architect, IDesign, Inc.
"This is the best resource I've ever seen for programming the Compact Framework. This book should be on the desk of everybody doing mobile development."
-Rebecca M. Riordan, author of Seeing Data
"With valuable information added to this new edition, Paul Yao and David Durant have enhanced their already invaluable guide to programming for the .NET Compact Framework. If you're a serious mobile programmer, this is the one book you need on your shelf-but it won't stay there."
-Josh Trupin, Microsoft Corporation
"Yao and Durant's second edition of their popular .NET CF book is a much needed update for all developers who want to build apps for the Windows Marketplace for Mobile. The book provides comprehensive coverage of the technology, and it is well suited for both .NET CF beginners and experts."
-Michael Yuan, cofounder, Ringful LLC
Completely revised and updated for .NET Compact Framework 2.0 and 3.5, Visual Studio 2008, and Windows Mobile Smart Phones, Programming .NET Compact Framework 3.5, Second Edition, teaches you how to write highly effective applications for handheld wireless devices with small screens, limited memory, and finite battery life.
This book is the definitive tutorial and reference for the .NET Compact Framework and Windows Mobile. If you're interested in developing for this burgeoning platform, there is no one better able to get you up to speed than industry veterans, master programmers, and teachers Paul Yao and David Durant.
With this book you will learn how to
Use each of the ten API sets available for Windows Mobile; when to use each; and, especially, when to use Win32 and the .NET Compact Framework 2.0 and 3.5
Write programs that make the most of a Windows Mobile device's limited battery life
Efficiently invoke Win32 APIs from the .NET Compact Framework
Write exceptional, data-driven applications using data binding and .NET controls
Manage device data with the object store, file I/O, and the registry
Work with databases using ADO.NET and LINQ
Synchronize mobile data with remote databases and the remote API
Make a mobile device work with the Windows Communication Foundation (WCF)
Create graphical output on Windows Mobile devices
If you want to learn Windows Mobile development but only have limited experience with the .NET Framework, this is the only book you need.
Product Description
If you're interested in developing for this burgeoning platform, there is no one better able to get you up-to-speed." -From the Foreword by Rob Tiffany, mobility architect, Microsoft
Completely revised and updated for .NET Compact Framework 2.0 and 3.5, Visual Studio 2008, and Windows Mobile Smart Phones, Programming .NET Compact Framework 3.5, Second Edition, teaches you how to write highly effective applications for handheld wireless devices with small screens, limited memory, and finite battery life.
This book is the definitive tutorial and reference for the .NET Compact Framework and Windows Mobile. If you're interested in developing for this burgeoning platform, there is no one better able to get you up to speed than industry veterans, master programmers, and teachers Paul Yao and David Durant.
With this book you will learn how to
Use each of the ten API sets available for Windows Mobile; when to use each; and, especially, when to use Win32 and the .NET Compact Framework 2.0 and 3.5
Write programs that make the most of a Windows Mobile device's limited battery life
Efficiently invoke Win32 APIs from the .NET Compact Framework
Write exceptional, data-driven applications using data binding and .NET controls
Manage device data with the object store, file I/O, and the registry
Work with databases using ADO.NET and LINQ
Synchronize mobile data with remote databases and the remote API
Make a mobile device work with the Windows Communication Foundation (WCF)
Create graphical output on Windows Mobile devices
If you want to learn Windows Mobile development but only have limited experience with the .NET Framework, this is the only book you need.
Backcover
If you're interested in developing for this burgeoning platform, there is no one better able to get you up-to-speed." -From the Foreword by Rob Tiffany, mobility architect, Microsoft
Completely revised and updated for .NET Compact Framework 2.0 and 3.5, Visual Studio 2008, and Windows Mobile Smart Phones, Programming .NET Compact Framework 3.5, Second Edition, teaches you how to write highly effective applications for handheld wireless devices with small screens, limited memory, and finite battery life.
This book is the definitive tutorial and reference for the .NET Compact Framework and Windows Mobile. If you're interested in developing for this burgeoning platform, there is no one better able to get you up to speed than industry veterans, master programmers, and teachers Paul Yao and David Durant.
With this book you will learn how to
Use each of the ten API sets available for Windows Mobile; when to use each; and, especially, when to use Win32 and the .NET Compact Framework 2.0 and 3.5
Write programs that make the most of a Windows Mobile device's limited battery life
Efficiently invoke Win32 APIs from the .NET Compact Framework
Write exceptional, data-driven applications using data binding and .NET controls
Manage device data with the object store, file I/O, and the registry
Work with databases using ADO.NET and LINQ
Synchronize mobile data with remote databases and the remote API
Make a mobile device work with the Windows Communication Foundation (WCF)
Create graphical output on Windows Mobile devices
If you want to learn Windows Mobile development but only have limited experience with the .NET Framework, this is the only book you need.
Figures xvii
Tables xxi
Foreword xxv
Preface xxvii
Acknowledgments xxxiii
About the Authors xxxvii
Chapter 1: Mobile Phone Programming 1
1.1 Selecting an Application Programming Interface 4
1.2 Memory Management 19
1.3 Conclusion 37
Chapter 2: Extending Battery Life 39
2.1 What Is the Problem? 40
2.2 Measuring Battery Usage 43
2.3 Device Power Study 51
2.4 Conclusion 58
Chapter 3: Platform Invoke 59
3.1 Overview of P/Invoke 60
3.2 Creating P/Invoke Declarations 66
3.3 Supported P/Invoke Function Parameters 75
3.4 A Sample Program: CallWin32 93
3.5 Writing Win32 Dynamic Link Libraries 96
3.6 Manual P/Invoke Parameter Passing 100
3.7 Communicating between Native and Managed Code 108
3.8 Comparing P/Invoke Support 112
3.9 Conclusion 113
Chapter 4: Data Binding to Controls 115
4.1 Data Binding 115
4.2 Complex Data Binding 124
4.3 Simple Data Binding 126
4.4 The DataGrid Control 132
4.5 Conclusion 177
Chapter 5: Storage 179
5.1 Smart-Device Data Storage 179
5.2 File I/O 183
5.3 Registry Access 213
5.4 Conclusion 221
Chapter 6: ADO.NET Programming 223
6.1 Examining ADO.NET 226
6.2 Working with Data Sets 236
6.3 Microsoft SQL Server CE 254
6.4 Microsoft SQL Server 287
6.5 Web Services 318
6.6 Conclusion 335
Chapter 7: LINQ 337
7.1 Overview 337
7.2 The Sample Application 344
7.3 LINQ to XML 378
7.4 Conclusion 383
Chapter 8: Synchronizing Mobile Data 385
8.1 Understanding SQL Server CE Synchronization 387
8.2 Installing Remote Data Connectivity 392
8.3 Using RDA 397
8.4 Using Merge Replication 409
8.5 Choosing between Merge Replication and RDA 424
8.6 Using Data Synchronization Services 424
8.7 Conclusion 448
Chapter 9: The Remote API 451
9.1 RAPI Fundamentals 451
9.2 Accessing the Object Store 470
9.3 Detecting Changes in Device Connection State 499
9.4 Loading Programs and DLLs 507
9.5 Conclusion 514
Chapter 10: Windows Communication Foundation 515
10.1 What Is WCF? 515
10.2 Creating a WCF Service 523
10.3 Creating a WCF Client in Windows Mobile 538
10.4 Conclusion 546
Chapter 11: Creating Graphical Output 549
11.1 An Introduction to .NET Compact Framework Graphics 549
11.2 Drawing on the Display Screen 561
11.3 Raster Graphics 570
11.4 Vector Graphics 602
11.5 Conclusion 619
Chapter 12: Text and Fonts 621
12.1 Drawing Text 621
12.2 Font Selection 625
12.3 Placing Text 632
12.4 Conclusion 640
Appendix A: Hungarian Notation for .NET Programs 641
A.1 Goals and Objectives 642
A.2 Guidelines 642
A.3 .NET Naming Guidelines 644
A.4 Hungarian Notation 646
Appendix B: Windows API Allocation and Cleanup Functions 659
Index 669
If you're interested in developing for this burgeoning platform, there is no one better able to get you up-to-speed.
-From the Foreword by Rob Tiffany, mobility architect, Microsoft
"Each day it seems that mobile devices are becoming more common and critical to our everyday lives. As more developers target this growing market, the need for a trusted guide grows, and this book provides that guidance. The authors have reached a rare balance in which they provide the core knowledge required to start the journey of mobile development as well as the depth to support a seasoned developer. Every developer building applications for Windows Mobile devices should have this book close at hand to guide them through the challenges and rewards of creating their applications."
-Mike Erickson, principal consultant, Neudesic
"This is one of the most complete technical books available on developing smart-device applications with Visual Studio and the Compact Framework 3.5. It covers many necessary topics, from preserving battery life to communicating with the outside world using WCF and everything in between. Whether you have been developing in the Compact Framework for years or are just getting started, this book has something in it for you."
-Jason Estes, senior software engineer, Itron
"This book arms Windows Mobile developers with the core knowledge they need for building rich business and personal applications. It also gives them great insight into what is going on under the covers, how the platform is unique compared to other versions of Windows, and how to build robust Windows Mobile applications productively."
-Brian Noyes, chief architect, IDesign, Inc.
"This is the best resource I've ever seen for programming the Compact Framework. This book should be on the desk of everybody doing mobile development."
-Rebecca M. Riordan, author of Seeing Data
"With valuable information added to this new edition, Paul Yao and David Durant have enhanced their already invaluable guide to programming for the .NET Compact Framework. If you're a serious mobile programmer, this is the one book you need on your shelf-but it won't stay there."
-Josh Trupin, Microsoft Corporation
"Yao and Durant's second edition of their popular .NET CF book is a much needed update for all developers who want to build apps for the Windows Marketplace for Mobile. The book provides comprehensive coverage of the technology, and it is well suited for both .NET CF beginners and experts."
-Michael Yuan, cofounder, Ringful LLC
Completely revised and updated for .NET Compact Framework 2.0 and 3.5, Visual Studio 2008, and Windows Mobile Smart Phones, Programming .NET Compact Framework 3.5, Second Edition, teaches you how to write highly effective applications for handheld wireless devices with small screens, limited memory, and finite battery life.
This book is the definitive tutorial and reference for the .NET Compact Framework and Windows Mobile. If you're interested in developing for this burgeoning platform, there is no one better able to get you up to speed than industry veterans, master programmers, and teachers Paul Yao and David Durant.
With this book you will learn how to
Use each of the ten API sets available for Windows Mobile; when to use each; and, especially, when to use Win32 and the .NET Compact Framework 2.0 and 3.5
Write programs that make the most of a Windows Mobile device's limited battery life
Efficiently invoke Win32 APIs from the .NET Compact Framework
Write exceptional, data-driven applications using data binding and .NET controls
Manage device data with the object store, file I/O, and the registry
Work with databases using ADO.NET and LINQ
Synchronize mobile data with remote databases and the remote API
Make a mobile device work with the Windows Communication Foundation (WCF)
Create graphical output on Windows Mobile devices
If you want to learn Windows Mobile development but only have limited experience with the .NET Framework, this is the only book you need.
Product Description
If you're interested in developing for this burgeoning platform, there is no one better able to get you up-to-speed." -From the Foreword by Rob Tiffany, mobility architect, Microsoft
Completely revised and updated for .NET Compact Framework 2.0 and 3.5, Visual Studio 2008, and Windows Mobile Smart Phones, Programming .NET Compact Framework 3.5, Second Edition, teaches you how to write highly effective applications for handheld wireless devices with small screens, limited memory, and finite battery life.
This book is the definitive tutorial and reference for the .NET Compact Framework and Windows Mobile. If you're interested in developing for this burgeoning platform, there is no one better able to get you up to speed than industry veterans, master programmers, and teachers Paul Yao and David Durant.
With this book you will learn how to
Use each of the ten API sets available for Windows Mobile; when to use each; and, especially, when to use Win32 and the .NET Compact Framework 2.0 and 3.5
Write programs that make the most of a Windows Mobile device's limited battery life
Efficiently invoke Win32 APIs from the .NET Compact Framework
Write exceptional, data-driven applications using data binding and .NET controls
Manage device data with the object store, file I/O, and the registry
Work with databases using ADO.NET and LINQ
Synchronize mobile data with remote databases and the remote API
Make a mobile device work with the Windows Communication Foundation (WCF)
Create graphical output on Windows Mobile devices
If you want to learn Windows Mobile development but only have limited experience with the .NET Framework, this is the only book you need.
Backcover
If you're interested in developing for this burgeoning platform, there is no one better able to get you up-to-speed." -From the Foreword by Rob Tiffany, mobility architect, Microsoft
Completely revised and updated for .NET Compact Framework 2.0 and 3.5, Visual Studio 2008, and Windows Mobile Smart Phones, Programming .NET Compact Framework 3.5, Second Edition, teaches you how to write highly effective applications for handheld wireless devices with small screens, limited memory, and finite battery life.
This book is the definitive tutorial and reference for the .NET Compact Framework and Windows Mobile. If you're interested in developing for this burgeoning platform, there is no one better able to get you up to speed than industry veterans, master programmers, and teachers Paul Yao and David Durant.
With this book you will learn how to
Use each of the ten API sets available for Windows Mobile; when to use each; and, especially, when to use Win32 and the .NET Compact Framework 2.0 and 3.5
Write programs that make the most of a Windows Mobile device's limited battery life
Efficiently invoke Win32 APIs from the .NET Compact Framework
Write exceptional, data-driven applications using data binding and .NET controls
Manage device data with the object store, file I/O, and the registry
Work with databases using ADO.NET and LINQ
Synchronize mobile data with remote databases and the remote API
Make a mobile device work with the Windows Communication Foundation (WCF)
Create graphical output on Windows Mobile devices
If you want to learn Windows Mobile development but only have limited experience with the .NET Framework, this is the only book you need.
Figures xvii
Tables xxi
Foreword xxv
Preface xxvii
Acknowledgments xxxiii
About the Authors xxxvii
Chapter 1: Mobile Phone Programming 1
1.1 Selecting an Application Programming Interface 4
1.2 Memory Management 19
1.3 Conclusion 37
Chapter 2: Extending Battery Life 39
2.1 What Is the Problem? 40
2.2 Measuring Battery Usage 43
2.3 Device Power Study 51
2.4 Conclusion 58
Chapter 3: Platform Invoke 59
3.1 Overview of P/Invoke 60
3.2 Creating P/Invoke Declarations 66
3.3 Supported P/Invoke Function Parameters 75
3.4 A Sample Program: CallWin32 93
3.5 Writing Win32 Dynamic Link Libraries 96
3.6 Manual P/Invoke Parameter Passing 100
3.7 Communicating between Native and Managed Code 108
3.8 Comparing P/Invoke Support 112
3.9 Conclusion 113
Chapter 4: Data Binding to Controls 115
4.1 Data Binding 115
4.2 Complex Data Binding 124
4.3 Simple Data Binding 126
4.4 The DataGrid Control 132
4.5 Conclusion 177
Chapter 5: Storage 179
5.1 Smart-Device Data Storage 179
5.2 File I/O 183
5.3 Registry Access 213
5.4 Conclusion 221
Chapter 6: ADO.NET Programming 223
6.1 Examining ADO.NET 226
6.2 Working with Data Sets 236
6.3 Microsoft SQL Server CE 254
6.4 Microsoft SQL Server 287
6.5 Web Services 318
6.6 Conclusion 335
Chapter 7: LINQ 337
7.1 Overview 337
7.2 The Sample Application 344
7.3 LINQ to XML 378
7.4 Conclusion 383
Chapter 8: Synchronizing Mobile Data 385
8.1 Understanding SQL Server CE Synchronization 387
8.2 Installing Remote Data Connectivity 392
8.3 Using RDA 397
8.4 Using Merge Replication 409
8.5 Choosing between Merge Replication and RDA 424
8.6 Using Data Synchronization Services 424
8.7 Conclusion 448
Chapter 9: The Remote API 451
9.1 RAPI Fundamentals 451
9.2 Accessing the Object Store 470
9.3 Detecting Changes in Device Connection State 499
9.4 Loading Programs and DLLs 507
9.5 Conclusion 514
Chapter 10: Windows Communication Foundation 515
10.1 What Is WCF? 515
10.2 Creating a WCF Service 523
10.3 Creating a WCF Client in Windows Mobile 538
10.4 Conclusion 546
Chapter 11: Creating Graphical Output 549
11.1 An Introduction to .NET Compact Framework Graphics 549
11.2 Drawing on the Display Screen 561
11.3 Raster Graphics 570
11.4 Vector Graphics 602
11.5 Conclusion 619
Chapter 12: Text and Fonts 621
12.1 Drawing Text 621
12.2 Font Selection 625
12.3 Placing Text 632
12.4 Conclusion 640
Appendix A: Hungarian Notation for .NET Programs 641
A.1 Goals and Objectives 642
A.2 Guidelines 642
A.3 .NET Naming Guidelines 644
A.4 Hungarian Notation 646
Appendix B: Windows API Allocation and Cleanup Functions 659
Index 669
If you're interested in developing for this burgeoning platform, there is no one better able to get you up-to-speed.