2006
32.973.267
004.42(075)
. .
67 . .:
, 2006. 304 .: .
ISBN 5-469-01300-6
,
Pocket PC.
, -
, . ,
Pocket PC.
,
.
.
, 2006
.
.
, , , .
, ,
, .
ISBN 5-469-01300-6
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1. Pocket PC . . . . . . . . . . . . 13
Pocket PC . . . . . . . . . . . . . . . . . . . . . . . 13
Pocket PC . . . . . . . . . . . . . . . . . . . . 14
Windows CE Pocket PC . . . . . . . . . . . . . . . . . . . . . . . . 14
Pocket PC . . . . . . . . . . . . . . . . . 18
eMbedded Visual Tools 3.0 Pocket PC 2002 SDK . . . . . . . . . . . . . . 18
eMbedded Visual C++ 4.0 Pocket PC 2003 SDK . . . . . . . . . . . . . . 19
Visual Studio .NET 2003 . . . . . . . . . . . . . . . . . . . . . . . . . 20
Visual Studio 2005 . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
. . . . . . . . . . . . . . . . . . . . . . . . . . 22
2.
Pocket PC . . . . . . . . . . . . . . . . . . . . . . . 23
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
. . . . . . . . . . . . . . . . . . . . . . . . . . 24
. . . . . . . . . . . . . . . . . . . 25
. . . . . . . . . . . . . . . . . . . . . . . 26
Microsoft Loopback Adapter . . . . . . . . . . . . . . . . . . 26
. . . . . . . . . . . . . . . . . . . . . . . . 27
. . . . . . . . . . . . . . . . . . . . . 27
Platform Manager . . . . . . . . . . . . . . . . . . . . . . 28
ActiveSync . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
ActiveSync . . . . . . . . . . . . . . . . . . . . . . . . . 32
CabWiz . . . . . . . . . . . . . . . . . . 33
. . . . . . . . . . . . . . . . . . . . . . . . 34
Mobile Developer Power Toys . . . . . . . . . . . . . . . . . . . . . . . . . 34
ActiveSync Remote Display . . . . . . . . . . . . . . . . . . . . . . . 34
CECopy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Convert_PPC_DAT_to_SP_XML . . . . . . . . . . . . . . . . . . . . . . 35
Hopper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
JShell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
PPC_Command_Shell . . . . . . . . . . . . . . . . . . . . . . . . . . 37
RAPI_Debug . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
RAPI_Start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
TypeIt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
. . . . . . . . . . . . . . . 39
3. Pocket PC
Microsoft eMbedded Visual Basic 3.0 . . . . . . . . . . 42
eMbedded Visual Basic 3.0 . . . . . . . . . . . . . . . . . . 42
. . . . . . . . . . . . . . . . . . . . 44
3.1. . . . . . . . . 45
Standard . . . . . . . . . . . . . . . . . . . . . 47
. . . . . . . . . . . . . . . . . . . . 48
(Toolbox) . . . . . . . . 48
3.2. . . . . . . . . . . . . 49
. . . . . . . . . . . . . . . . . . . 50
. . . . . . . . . . . . 51
3.3. . . . . . . . . . . . . . 52
. . . . . . . . . . . . . . . . . . . . . . . . . . . 54
. . . . . . . 56
. . . . . . . . . . . . . . . . . . . . . 56
. . . . . . . . . . . . . . . . . . 57
. . . . . . . . . . . . . . . . . . . . 58
. . . . . . . . . . . . . . . . . . . . . . . . . . 59
eVB . . . . . . . . . . . . . . . . . 61
(Properties Window) . . . . . . . . . . . . . . . 61
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Form . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
3.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
3.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
. . . . . . . . . . . . . . . . . . . . 73
ActiveX . . . . . . . . . . . . . . . . . . . . . . 76
ActiveX . . . . . . . . . . . . . . . . . . . 76
ActiveX . . . . . . . . . . . 77
MenuBar . . . . . . . . . . . . . . . . . . . . . . . . . . 79
3.6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
eVB . . . . . . . . . . . . . . . . . . . . . . . . . . 92
. . . . . . . . . . . . . . . . . . . . . . . 94
3.7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
. . . . . . . . . . . . . . . . . 95
eVB CE API . . . . . . . . . . . . . . . . . . 95
4
eVB . . . . . . . . . . . . . . . . . . . . . . . . . . 96
3.8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
4. Pocket PC
Microsoft eMbedded Visual C++ 3.0 . . . . . . . . . . 101
. . . . . . . . . . . . . . . . . . . . 101
4.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
C++ . . . . . . . . . . . . . . . . . . . . . . . 105
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
4.1 () . . . . . . . . . . . . . . . . . . . . 106
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
, . . . . . . . . . . . . . . . . . . 106
() . . . . . . . . . . . . . . . . . . . 108
4.1 () . . . . . . . . . . . . . . . . . . . . 108
4.1 () . . . . . . . . . . . . . . . . . . . . 110
. . . . . . . . . . . . . . . . . . . . . . 112
4.1 () . . . . . . . . . . . . . . . . . . . . 113
lvalue ( ) . . . . . . . . . . . . . . . . . . . 113
typedef . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
4.1 () . . . . . . . . . . . . . . . . . . . . 122
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
4.1 () . . . . . . . . . . . . . . . . . . . . 124
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
eMbedded Visual C++ 3.0 . . . . . . . . . . . . . . . . . . 125
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
. . . . . . . . . . . . . . . . 128
. . . . . . . . . . . . . . . 130
4.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
4.2 () . . . . . . . . . . . . . . . . . . . . 131
4.2 () . . . . . . . . . . . . . . . . . . . . 132
. . . . . . . . . . 133
. . . . . . . . . . . . . . . . . . . . . . . . . 134
C . . . . . . . . . 137
4.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
4.3 () . . . . . . . . . . . . . . . . . . . . 144
5
4.3 () . . . . . . . . . . . . . . . . . . . . 148
4.3 () . . . . . . . . . . . . . . . . . . . . 150
4.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
Common Controls, . . . . . . . . . 155
4.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
CommandBar . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
4.6 . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
. . . . . . . . . . . . . . . . . . . . . . . . . . 163
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
. . . . . . . . . . . . . . . . . . . . . . . . . . . 167
C++ . . . . . . . . . . . . . . . . . . . 172
. . . . . . . . . . . . . . . 172
. . . . . . . . . . . . . . . . . 173
4.7 . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
4.7 () . . . . . . . . . . . . . . . . . . . . 177
. . . . . . . . . . . . . . . . . . . . . . . . . . . 179
.inf . . . . . . . . . . . . . . . . . . . . . . . . . 180
4.8 . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
5. Pocket PC
Microsoft eMbedded Visual ++ 4.0 . . . . . . . . . . 185
- . . . . . . . . . . . . . . . . 185
, , , . . . . . . . . . 185
, . . . . . . . . . . . . . . . . . . . 186
5.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
5.1 () . . . . . . . . . . . . . . . . . . . . 191
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
5.1 () . . . . . . . . . . . . . . . . . . . . 192
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
5.1 () . . . . . . . . . . . . . . . . . . . . 195
. . . . . . . . . . . . . . . . . . . . . . . . . 196
5.1 () . . . . . . . . . . . . . . . . . . . . 196
. . . . . . . . . . . . . . . . . . . . . . . . . . 197
MFC . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
MFC . . . . . . . . . . . . . . . . . . . . . . . . 198
MFC . . . . . . . . . . . . . . . . . . . . 201
5.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
6
6. .NET Compact Framework
Pocket PC Microsoft Visual Studio .NET 2003 . . 210
.NET Compact Framework . . . . . . . . . . . . . . . . . . . . . . . . . 210
.NET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
.NET . . . . . . . . . . . . . . . . . . . . . . . . . . 211
.NET . . . . . . . . . . . . . . . . . . . . . . . . 212
WebForms . . . . . . . . . . . . . . . . . . . . . . . . 212
WindowsForms . . . . . . . . . . . . . . . . . . . . . . 212
- . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
.NET . . . . . . . . . . . . . . . . . . . . 212
. . . . . . . . . 212
Common Intermediate Language . . . . . . . . . . . . . . . . . . . . 213
Common language runtime . . . . . . . . . . . . . . . . . . . . . . . 213
Common Language Specification . . . . . . . . . . . . . . . . . . . . 213
Common type system . . . . . . . . . . . . . . . . . . . . . . . . . 214
Common Language Infrastructure . . . . . . . . . . . . . . . . . . . . 214
Compact Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
Application domains . . . . . . . . . . . . . . . . . . . . . . . . . . 214
. . . . . . . . . . . . . . . . . . . . . . . . . 214
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
.NET Framework
Compact Framework . . . . . . . . . . . . . . . . . . . . . . . 215
. . . . . . . . . . . . . . . . . 215
() CF . . . . . . . . . . . . . . . . . . . . 216
CF . . . . . . . . . . . . . . . . . 217
VB.NET: VB 6 . . . . . . . . . . . . . . . 218
eVB Visual Basic .NET . . . . . . . . . . . . . . . . . . . . . . 218
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
. . . . . . . . . . . . . . . . . . . . . . . . . . . 220
. . . . . . . . . . . . . . . . . . . . . . . . 220
XML . . . . . . . . . . . . . . . . . . . . . . . 220
VB.NET Compact Framework . . . . . . . . . . . . . . . . . . . . . . . 220
. . . . . . . . . . . . . . . . . . . . . . . . 220
6.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
. . . . . . . . . . . . . . . . . . . . . 224
.NET CF . . . . . . . . . . . . . . . . . . . . . 225
6.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
XML . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
6.2 () . . . . . . . . . . . . . . . . . . . . 234
7
. . . . . . . . . . . . . . 242
6.2 () . . . . . . . . . . . . . . . . . . . . 243
DataSet . . . . . . . . . . . . . . . . . . . . . 246
6.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
. . . . . . . . . . . . . . 250
SQL Server CE . . . . . . . . . . . . . . . . . . . . . . . . 259
6.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
6.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
. . . . . . . . . . . . . . . . . . . . . . . . . . 268
. . . . . . . . . . . . . . . . . . . . . . . . . . 269
6.6 . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
6.6 () . . . . . . . . . . . . . . . . . . . . 273
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
7.
. . . . . . . . . . . . . . 275
Pocket PC . . . . . . . . . . . . . . . . 275
Basic4PPC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
NSBasic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
Pelles C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
PPL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
Borland Delphi 2005 . . . . . . . . . . . . . . . . . . . . . . . . . . 284
On-Board . . . . . . . . . . . . . . . . 284
Pocket ViC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
Python . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
Scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
DSForth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
www.rainer-keuchel.de . . . . . . . . . . . . . . . . . 289
PGCC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
Java . . . . . . . . . . . . . . . . . . . . . . . . . 295
Mysaifu JVM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
Weme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
CrEme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298
Jeode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298
SuperWaba . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299
Ewe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304
8
. , , -
, -, -
ZX-Spectrum, -0010 -
, , IBM
8086. , -
. ,
. -
IBM 486, 133 , 32 256 .
.
Pocket PC, . -
. , , -
. , , ,
. ,
. , -
, .
- , -
Palm, Palm, ,
Pocket PC. , -, , . -
, -. Pocket PC , .
Windows. ,
. , ,
.
,
Tetris, .
, Windows.
Linux ,
, , , -
.
, , ,
IBM 486, - . ,
Doom. -
, Doom , -
.
. -
, -
, -
. , ?
, , ,
Pocket PC? - ,
-
.
, , .
, ,
. . , -
,
Pocket PC, QBackup,
.
.
Pocket PC , Java, Pocket PC
, .
, -
, Microsoft.
, -
Pocket PC. Microsoft -
, .
Visual Basic Visual C++,
. -
Assemler. ,
, -
. -
.
, , -
Pocket PC. ,
, Pocket PC
. -
,
. , -
,
. ,
Pocket PC , -
, ,
, .
,
-
. , , -
. -
,
10
, , , -
Pocket PC. -
.
, , -
Pocket PC 2003. , -
Microsoft -
, , Pocket PC 2002,
Pocket PC 2003. Microsoft Visual Basic
Pocket PC 2003, -
, . -
eMbedded Visual Basic 3. -
eMbedded Visual C++ 3.
eMbedded Visual Tools 3.0 2002 Edition.
, -
.
1. - Microsoft, -
http://msdn.microsoft.com/mobility/downloads/updates/default.aspx.
2. Products & Updates -
eMbedded Visual Tools 3.0 - 2002 Edition .
3. , Download,
. -
evt2002web_min.exe. -
. ,
. , -
, Unzip To Folder,
Unzip.
4. setup.exe
. -
, .
evt2002web_min.exe ,
,
- . -
. .
, Download.
evt2002web_min.exe.
Pocket PC 2002 -
Pocket PC 2003.
Products & Updates eMbedded
11
Visual C++ 4.0. , -
.
Po-
cket PC. Microsoft ,
Pocket PC 2003. -
.NET. ,
.NET, Visual Studio 2003. ,
Microsoft, -
.
Visual Studio 2003, , -
.NET Pocket PC .
, -
.
,
[email protected] ( , ).
!
- :
http://www.piter.com.
12
1
Pocket PC
Pocket PC
-
, ,
, Pocket PC . , -
, ,
.
, Pocket PC -
,
. -
Pocket PC , , -
, . , -
. Pocket PC
.
Pocket PC -
:
TFT-. Pocket PC 320240 .
, , -
Pocket PC ,
.
.
.
( ).
.
.
.
.
.
IRDA- -
.
( Pocket PC Wi-Fi -
).
.
.
.
.
( -
).
Pocket PC, ,
. ROM RAM.
Pocket PC -
. 80 % -
ARM, MIPS
SH. Microsoft
, x86, -
, -
- .
,
Windows CE, Microsoft
http://www.msembedded.ru/processors.aspx.
Pocket PC
Windows CE Pocket PC
. ,
, C, -
.
Pocket PC ,
-
. Windows CE 2.11, Windows CE 3.0, Windows CE 4.0,
Windows CE 4.1, Windows CE 4.2, Windows CE 5.0, Windows CE .NET, Po-
cket PC 2000, Pocket PC 2002, Windows Mobile 2003, Windows Mobile 2003 SE
Windows Mobile 5.0.
, Windows CE ,
, -
. , -
,
14 1. Pocket PC
, , -
. Windows CE -
.
Windows CE .
, -
, , .
Pocket PC -
Windows Mobile for Pocket PC,
Microsoft Pocket PC. Windows Mobile -
Windows CE, .
1.1 ,
.
1.1. Pocket PC, Windows Mobile Windows CE
OS Windows CE
Palm-size PC Windows CE 2.11 2.11
Pocket PC 2000 Microsoft Pocket PC 3.0
Pocket PC 2002
Smartphone 2002
Microsoft Pocket PC 2002
Windows Mobile 2002
4.0
Pocket PC 2003
Smartfone 2003
Microsoft Pocket PC 2003
Windows Mobile 2003
4.20
Pocket PC 2003 SE
Smartfone 2003 SE
Microsoft Pocket PC 2003 SE
Windows Mobile 2002 SE
4.21
Windows Mobile 5.0 5.0
, Microsoft -
. Windows CE 3.0, -
, ,
OS. , Pocket
PC 2002, Pocket PC 2003 -
, -
.
Windows CE .NET Windows CE 4.x.
, Windows CE 4.0, Microsoft -
Windows CE .NET
Compact Framework (CF). Win-
dows CE 4.0 CF Beta, 4.1 -
, 4.2 .NET Framework service pack 2.
, Pocket PC
, .
Windows Mobile (Windows CE) -
Win32 API ,
-
.
Pocket PC 15
, ,
. 1.1.
. 1.1. Windows Mobile Pocket PC
, ,
.
OAL (OEM Adaptation Layer) , -
, -
. OAL -
.
GWES (Graphics, Windowing, and Events Subsystem) -
(GDI, Graphics Device Interface) -
.
Windows CE API,
OS.
Core OS Interface -
, , , ,
, .
DLL -
, . Fiber -
, . Memory Management
. -
Power Management -
. Message Queue Point-to-Point
,
. Process and Thread
, .
Time -
,
16 1. Pocket PC
. API ToolHelp , API
Pointer . Stylus
, -
. Authentication -
. -
,
NTLM Kerberos. Cryptography -
. , , ,
, ertificates.
RAS API Dial-Up Networking -
,
PPP. Fonts
, MLang
. --
Pocket PC API Software-Based
Input Panel (SIP API).
JScript 5.5
. Active Directory Service
Lightweight Directory Access Protocol (LDAP). Multilingual
User Interface (MUI) . -
, -
. Message Queuing (MSMQ)
. -
Network User Interface (NetUI)
. API Object Exchange Protocol (OBEX)
, -
IrDA Bluetooth.
. Database
Windows CE, -
. -
, , .
File I/0 -
, , . API File Mapping
-
,
, -
.
File System Driver (FSD) (-
, ) -
. API Registry . -
Pocket Outlook Object Model (POOM)
Pocket Outlook ,
.
, .
API Windows Networking API/Redirector
Pocket PC 17
. Virtual Private Networking
Pocket PC , Waveform Audio -
. HTTP FTP -
WinSock API Windows
Internet Services (WinInet), , API Windows Sockets -
.
, Windows CE -
. ,
, Pocket PC,
, , -
Windows. , -
, , COM- Windows CE
, . . -
- -
, ,
32 .
Microsoft , Win-
dows CE .
, -
,
.
Pocket PC
Microsoft Pocket PC -
, -
, .
.
, Microsoft,
2005 Introduction to Develop-
ment Tools for Windows Mobile-based Devices.
:
eMbedded Visual Tools 3.0;
eMbedded Visual C++ 4.0;
Visual Studio .NET 2003;
Visual Studio .NET 2005.
eMbedded Visual Tools 3.0 Pocket PC 2002 SDK
:
eMbedded Visual Basic;
eMbedded Visual C++ 3.0;
18 1. Pocket PC
Pocket PC 2002 SDK;
Smartfone 2002 SDK.
.
eMbedded Visual Basic
, Po-
cket PC 2002, Pocket PC 2003 Pocket PC 2003 SE,
.
, Microsoft -
, , , -
Pocket PC. eVB -
, ,
,
. -
, , -
, run-time ,
. , -
ActiveX.
eVB -
, -
. , -
, ,
.
eMbedded Visual C++ 3.0
, eVC 3.0, -
Pocket PC 2002 Pocket PC 2003 Pocket PC 2003 SE,
API.
, eVC 3.0, , -
, eVB. eVC -
. , -
,
ActiveX. eVC
COM WinAPI, MFC -
,
eVB . , -
, , -
API -
.
, Pocket PC -
.
eMbedded Visual C++ 4.0 Pocket PC 2003 SDK
eVC 4.0 Pocket PC 2003 SDK -
. , -
Pocket PC 19
Pocket PC 2003, Service Pack 2.
eVC 4.0
Pocket PC 2003 SE c VGA- 192 dpi -
,
Service Pack 4,
Microsoft Mobile Application Development Toolkit Developer Resources
for Windows Mobile 2003 Second Edition.
Microsoft, -
eVC 4.0.
, eVC 3.0, eVC 4.0, -
,
Pocket PC 2003 Pocket PC 2003 SE. eMbedded
Visual Basic Pocket PC 2003,
Microsoft, .
,
.NET CF, run-time
Visual Basic.
Visual Studio .NET 2003
, Visual Studio .NET 2003
Microsoft.
Microsoft ,
Pocket PC 2003.
Visual Basic .NET C#.
.NET Compact Framework.
. -
, Pacsal Java
. Visual Basic -, -
, -
. Visual Studio .NET
2003 . , Visual Studio
.NET 2003 . , -
,
eVC.
Visual Studio 2005
Beta, -
Microsoft, SDK
(Windows Mobile SDK 5.0).
Visual Studio 2005, Microsoft -
, -
. Visual Studio 2005 .
Windows Mobile 2003, Windows Mobile 2003
Second Edition Windows Mobile 5.0 C++.
20 1. Pocket PC
.NET Com-
pact Framework 1.0 Windows Mobile 2003, Windows Mobile
2003 Second Edition Windows Mobile 5.0 C# Visual Basic
.NET.
.NET Com-
pact Framework 2.0 Windows Mobile 5.0 C#
Visual Basic .NET.
1.2.
eMbedded Visual Tools 3.0
(2002 Edition)
eMbedded
Visual C++
4.0 ( SP4)
Visual
Studio
.NET 2003
Visual
Studio
.NET 2005eMbedded Visual
C++ 3.0
eMbeddedVisual
Basic 3.0
X X X
X
X X
X X
SDK
Pocket PC 2000
Pocket PC 2002X X X
Smartphone 2002 X
Windows Mobile
2003X X X
Windows Mobile
2003 Second EditionX X X
Windows Mobile 5.0 X
1.3. .NET Compact Framework
1.0 2.0
Visual Studio .NET 2003 X
Visual Studio 2005 X X
Windows Mobile
Windows Mobile 5.0 (1.0 SP3)
Windows Mobile 2003 Second
Edition
(1.0 SP2) (
Pocket PC)
Windows Mobile 2003 (1.0 SP1) (
Pocket PC)
Smartphone 2002
Pocket PC 2002
Pocket PC 2000
Pocket PC 21
.NET Com-
pact Framework 2.0 Pocket PC
Windows Mobile 2003 C# Visual Basic .NET.
. 1.2 1.3.
Microsoft
, . -
, -
Microsoft .
.
1. Microsoft ActiveSync 4.0. -
ActiveSync 4.0
.
2. eMbedded Visual Tools 2002 Edition, Pocket PC 2002 SDK Smart-
phone 2002 SDK.
3. eMbedded Visual C++ 4.0 Service Pack 4.
4. Visual Studio .NET 2003.
Pocket PC 2003 Pocket PC 2003 -
.NET Compact Framework. -
.NET Compact Framework . -
.NET Compact Framework, ,
.
5. Pocket PC 2003 SDK.
6. -
,
Pocket PC 2003 Second Edition.
7. Developer Resources for Windows Mobile 2003 Second Edition.
8. Visual Studio 2005.
9. Windows Mobile 5.0 SDK.
22 1. Pocket PC
2
Pocket PC
, -
, Microsoft, ,
, .
Pocket PC, -
ActiveSync, -
CabWiz,
ActiveSync, Emulator
ActiveSync Connection Tool, ,
, Windows Mobile Developer
Power Toys.
. -
. .
PC. , ,
, -
Pocket PC .
,
.
, Microsoft
SDK for Pocket PC 2003. , -
, -
. ,
.
Microsoft Windows Pocket PC 2003 SDK -
eMbedded Visual C++ 4.0 (Service Pack 2),
Visual Studio .NET 2003.
.
SDK
(. 2.1).
. 2.1. Pocket PC 2003 SDK
Pocket PC 2003 Emulator, -
(. 2.2):
. 2.2. Pocket PC 2003
24 2. Pocket PC
, -
, , -
emul.cmd. .
start "" "C:\Program Files\Common Files\Microsoft Shared\Windows CE Tools\ Platman\bin\PBEmulator.exe" /MemorySize 64 /Fastbackground /Skin "C:\Program Files\Windows CETools\wce420\POCKET PC 2003\Emulation\pocket_pc_emulator_skin.xml" /CEImage"C:\Program Files\Windows CE Tools\wce420\POCKET PC 2003\Emulation\ PPC_2003_WWE.bin"/VMName "POCKET PC 2003 - POCKET PC 2003 Emulator" /HostKey 165
, -
. -
, .
/Video . -
. -
, (skin), -
.
.
80 1024 , 64 768 -
, 8, 16 32.
/Ethernet .
Ethernet . -
None, Shared, Virtualswitch media access control (MAC)
. -
, .
,
, MAC-.
.
None .
Shared ( IP-),
.
, -
, .
Virtualswitch IP-
DHCP ,
, .
/Skin . ,
. XML,
.
/CEImage . -
. , .
/MemorySize . , -
. .
32 256 .
Pocket PC 2003 64 .
25
/Fastbackground .
, .
/HostKey . -
, -
, . -
.
/VMName , , -
. ,
. -
, .
/VMID ,
(GUID) . , -
.
,
,
, -
.
: Microsoft Windows 2000 Professional Windows 2000
Server Service Pack 2, Microsoft Windows XP Home Edition
Windows XP Professional.
Intel Pentium II 400 .
196 .
Microsoft Loopback Adapter.
. -
. , -
, ,
.
Microsoft Loopback Adapter
Microsoft Loopback Adapter
, , -
. Microsoft Loopback Adapter
.
1. .
2. .
3. , ,
.
26 2. Pocket PC
4. -
.
5. , .
6. .
7. Microsoft .
, , -
.
. -
, . -
.
Virtual PC Emulated Ethernet Switch.
.
, , Pocket PC. -
.
1. , -
, TCP\IP.
2. x86. , -
, ,
. -
,
ARM
.
Pocket PC, .
3. Pocket PC. -
.
4. , ,
.
5. , -
-
.
.
Host + F ,
-
, -
.
.
Host + P .
27
Host + R
.
Host + T .
Host + F4 .
Save Emulator State.
, , -
. -
. . -
C:\Documents and Settings\_\Application Data
.vsv (, {31F6C796-7FD5-43AC-A8C2-A7CDB8C00A3B}.vsv).
.
Host -
, /HostKey .
. 2.1.
2.1.
HostKey
ALT 164
CTRL 162
SHIFT 160
Windows logo 91
ALT 165
CTRL 163
SHIFT 161
Windows logo 92
Platform Manager
-
.
.
Platform Manager
(),
. Platform Manager -
C:\Program Files\
Common Files\Microsoft Shared\Windows CE Tools\Platman\bin\wce420. -
Platform Manager Microsoft, -
Pocket PC Windows CE,
Configure Windows CE Platform Manager, -
.
28 2. Pocket PC
C:\Program Files\Common Files\Microsoft Shared\
Windows CE Tools\Platman\bin\wce420 cefilevw.exe. -
-
.
, ConnectionConfigure Windows CE Platform
Manager.
(. 2.3).
. 2.3.
Pocket PC 2003 Emulator, -
Properties. (. 2.4).
. 2.4. Pocket PC 2003
29
Transport TCP\IP Transport For
Windows CE, Startup Server Emulator Startup Server. -
Configure, Startup Server,
(. 2.5).
. 2.5.
, .
DeviceImage , -
.
Pocket PC 2003 Pocket PC 2003 Phone Edition -
.
VideoSkin ,
. Phone Edition -
.
SystemHostKey HostKey.
Communication -
.
Ethernet NAT. Virtual
Switch .
Serial Port 1 COM-
.
30 2. Pocket PC
Serial Port 2 COM-
.
Parallel Port
.
OK. Test. -
, - -
. -
, Cancel Testing Device Connection OK.
.
ActiveSync
ActiveSync , -
(Pocket PC) (. 2.6).
. 2.6. ActiveSync
ActiveSync. ,
, .
ActiveSync
, ,
Pocket PC.
, ActiveSync -
Pocket Outlook
. -
, ActiveSyn , -
.
ActiveSync 31
1. , -
.
.
2. ,
.
3. .
, ActiveSync ,
, -
. SDK , -
. C:\Program Files\Windows CE
Tools\wce420\POCKET PC 2003\Activesync.
. ActiveSync
, .
ActiveSync ,
.
ActiveSync
ActiveSync -
, -
.
1. Microsoft Loopback Adapter.
2. Microsoft .NET Framework 1.1 SDK .
Microsoft . -
Visual Studio .NET, SDK .
. 2.7.
3. Platform Manager.
, TCP\IP -
Use Fixed Address.
32 2. Pocket PC
Startup Server Emulator Starup Server -
CommunicationEthernet Virtual Switch.
Platform Manager.
4. ActiveSync.
Microsoft Pocket PC 2003 SDK
Pocket PC 2003 SDK. .
EmuASCfg.exe /PPC - Enter. , -
(. 2.7).
EmuASCfg.exe /PPC , -
ActiveSync.
CabWiz
, -
. .
1. , .
2. , , -
.
3. .
4. , - .
5. - .
6. .
7. .
8. . -
,
.
9. . -
, ,
, -
.
AppInstall (
), CabWiz, -
( .cab), -
Pocket PC.
CabWiz -
, ,
.
CabWiz 33
CabWiz.exe C:\Program Files\Windows CE Tools\
wce420\POCKET PC 2003\Tools. abWiz.exe -
.
cabwiz.exe "inf_file" [/dest dest_directory] [/err error_file][/cpu cpu_type [cpu_type]][/platform platform_label [platform_label]]
.
inf_file (-
, ) .inf, -
, CabWiz .
, .cab, -
dest_directory. , .cab
, .
, -
, error_file. -
,
. cpu_type
, -
.
C:\Program Files\Windows CE Tools\wce420\POCKET PC 2003\Target.
, ,
, /cpu ARMV4 X86. platform_label -
, .cab. -
. 2.2.
2.2. platform_label.
platform_label
Pocket PC 2003 device 2577
Pocket PC 2003 emulator 686
Pocket PC 2002 device 2577
Pocket PC 2002 emulator 686
Mobile Developer Power Toys
, -
, -
Microsoft, . -
.
ActiveSync Remote Display
Pocket PC -
. ,
, . Remote
34 2. Pocket PC
Display , ,
. -
, Pocket PC -
. . 2.8.
. 2.8. ActiveSync Remote Display
CECopy
-
, ActiveSync. ,
ActiveSync ,
Mobile
Developer Power Toys.
.
CeCopy [ ]
/is ,
, /s
, -
. , cecopy /s *.dll dev:\windows .dll windows Pocket PC.
Convert_PPC_DAT_to_SP_XML
Convert_PPC_DAT_to_SP_XML .cab
Pocket PC ,
.
Mobile Developer Power Toys 35
Hopper
-
- . -
. - -
.
-
.
Hopper
.
JShell
. -
,
. . 2.9.
. 2.9. JShell
,
.
.
36 2. Pocket PC
-r .
-f 60 , -
.
-m mi
4 . miXXX.txt \My Documents,
XXX -.
-w win
4 . winXXX.txt -
\My Documents, XXX -.
, -
(. . 2.9), -
. , -
!.
JShell.
.
win .
gi proc .
kp # , -
#.
gi thrd .
gi mod (DLL).
gi mod "xx" (DLL), -
xx.
mi .
mi full .
s , -
.
PPC_Command_Shell
,
(. 2.10).
arm Windows
Pocket PC cmd.exe.
, help Enter.
RAPI_Debug
. bugtrap.exe -
Windows, RapiDbg.exe
. , -
ActiveSyn. RapiDbg.exe -
Mobile Developer Power Toys 37
(-
, ),
, ,
Pocket PC.
. 2.11.
. 2.10.
. 2.11.
38 2. Pocket PC
RAPI_Start
Pocket PC, ActiveSync.
, RAPI_Startiexplore.exe http://yandex.ru/, Pocket PC Pocket Explorer .
TypeIt
.
.
, -
, -
Pocket PC.
, -
, ,
. Pocket PC ,
. -
Pocket PC
. , -
, .
-
. ,
Pocket PC -
.
. -
, . , -
, ,
, ,
Microsoft Outlook.
(Greg Keyser),
Microsoft, Microsoft
Mobile DevCon 2004 . -
.
1. ,
. -
, . -
.
39
, -
, Pocket PC
,
, (. 2.12).
. 2.12.
, -
, ( -
).
2. , -
, (,
) .
3.
.
, -
.
Pocket PC ,
,
.
,
, .
.
4.
44 .
5. 8 .
6. 20 .
7. (. 2.13) -
.
.
. -
.
.
8 .
40 2. Pocket PC
8. ,
, .
.
5
.
10
. . 2.14 , -
.
9. , -
-
.
10. . -
,
, .
Pocket PC.
41
. 2.14. . 2.13.
3
Pocket PC Microsoft
eMbedded Visual Basic 3.0
eMbedded Visual Basic 3.0
eMbedded Visual Basic 3.0
eVB.
eVB (
Microsoft eMbedded Visual ToolseMbedded Visual Basic 3.0), -
(
C:\Program Files\Microsoft eMbedded Tools\EVB\ EVB3.EXE). -
(. 3.1).
. 3.1.
Windows CE for PocketPC
.
, .
.
eVB , -
(. 3.2).
. 3.2.
. -
. -
,
, (. 3.3).
. 3.3.
eMbedded Visual Basic 3.0 43
-
,
.
, , -
(SDI), ,
ToolsOptionsGeneralSDI Development
Enviroment.
Toolbars View. -
(. 3.4).
. 3.4. Toolbars
.
Debug .
Edit .
Form Editor .
Standard .
Customize
(. 3.5).
. 3.5.
44 3. Pocket PC Visual Basic 3.0
Toolbars ,
. , -
Shortcut Menus, .
New -
, ,
.
3.1.
1. ViewToolbarsCustomize. ,
. 3.5.
2. New.
3. MyTB.
4. Close. . -
,
, (. 3.6).
. 3.6.
5. , -
.
6. Customize.
Commands. ,
.
, ,
. -
, MyTB (. 3.7).
,
. -
, Customize Modify Selection. -
(. 3.8).
.
Reset -
.
Delete .
Name .
Copy Button Image
.
eMbedded Visual Basic 3.0 45
. 3.7.
. 3.8.
Paste Button Image
.
Reset Button Image -
.
Edit Button Image -
. .
Change Button Image -
.
Default Style
.
46 3. Pocket PC Visual Basic 3.0
Text Only (Always) , -
.
Text Only (In menus) ,
,
.
Image and Text ,
, .
Begin a Group , -
, .
, . -
, .
Customize Options , -
.
Large icons .
Show ScreenTips on Toolbars
.
Show ShortCut Key on ScreenTips -
.
Menu Animations
.
Standard
, -
.
, -
.
.
.
-
, .
,
-
, .
-
(Undo) (Redo).
.
,
,
.
eMbedded Visual Basic 3.0 47
,
.
, -
.
Project Explorer -
.
-
.
.
.
, -
eVB, .
, .
,
.
, -
. Docable -
. Docable , -
.
Hide .
View.
(Toolbox)
(. 3.9).
. 3.9. eVB
-
.
eVB,
General. ,
48 3. Pocket PC Visual Basic 3.0
. eVB -
ActiveX, -
ActiveX, . -
ActiveX ,
eVB Windows API -
.
3.2.
1. .
(. 3.10).
. 3.10.
2. Add Tab.
ActiveX, -
. ActiveX
.
3. ActiveX .
, , . ,
Components.
(. 3.11).
Controls ,
.
, Browse ,
,
Windows CE.
4. ,
Controls.
.
5. , -
.
6. -
, Rename Tab Delete Tab -
,
.
eMbedded Visual Basic 3.0 49
. 3.11.
, -
ActiveX , .
.
, -
.
1. . -
.
2. ( ) ,
, .
, -
.
3. -
. , -
.
, -
Ctrl.
- -
, , -
. -
50 3. Pocket PC Visual Basic 3.0
,
,
.
Delete.
, -
. ,
.
-
Shift. ,
Alt.
,
.
, ,
Shift.
.
eVB , Format.
.
Align .
Lefts -
.
Centers -
.
Rights
.
Tops
.
Middles -
.
Bottoms
.
To Grid
. -
, ToolsOptionsGeneral -
Align Controls to Grid. ,
,
.
Make same size .
eMbedded Visual Basic 3.0 51
Width
.
Heigth
.
Both , .
Size to Grid -
.
Horizontal Spacing
.
Make Equal
. -
.
Increase
.
Decrease
.
Remove
.
Vertical Spacing
. , Horizontal Spacing.
Center in form . -
. -
, -
.
Order .
Bring to front
.
Send to Back
.
Lock Controls
.
3.3.
1. Shape, Label,
Timer , . 3.12.
2. Command1
.
. , -
3.1.
52 3. Pocket PC Visual Basic 3.0
3.1
Private Sub Command1_Click()Label1.Font.Size = 20Label1.Font.Bold = TrueLabel1.WordWrap = TrueLabel1.Alignment = vbCenterLabel1.Caption = ", !"Timer1.Interval = 300Timer1.Enabled = TrueShape1.FillColor = &HFF&Shape2.FillColor = &HFF&Shape3.FillColor = &HFF&
End Sub
. 3.12.
3. Timer1
3.2.
3.2
Private Sub Timer1_Timer()If (Shape1.FillStyle = 1) Then
Shape1.FillStyle = 0Shape2.FillStyle = 0Shape3.FillStyle = 0
ElseShape1.FillStyle = 1Shape2.FillStyle = 1Shape3.FillStyle = 1
End IfEnd Sub
4. Pocket PC 2002 (. 3.13).
. 3.13.
eMbedded Visual Basic 3.0 53
5. RunExecute
Ctrl+F5. , -
.
6. Command1. -
, !,
(. 3.14).
. 3.14.
ToolsOptions eVB.
.
Editor
.
Auto Syntax Check -
.
Require Variable Declaration -
Option Explicit, .
Auto List Members .
Auto Quick Info
.
Auto Data Tips -
.
Auto Indent
.
54 3. Pocket PC Visual Basic 3.0
Tab Width .
Drag-and-Drop Text Editing -
.
Default to Full Module View
, -
.
Procedure Separator , -
.
Editor Format
-
.
Code Colors ,
.
(Foreground), (Background) (Indicator),
, .
Font .
Size .
Margin indicator bar -
.
General
,
.
Show Grid -
.
Width -
. 2
60 .
Height -
. 2
60 .
Align Controls to Grid -
.
Show ToolTips -
,
.
Collapse Proj. Hides Windows ,
,
.
SDI Development Environment , -
, -
.
eMbedded Visual Basic 3.0 55
Docking
. -
, ,
Docable .
Environment
,
.
Prompt for project
eVB.
Save Changes
.
Prompt To Save Changes
.
Do not Save Changes ,
.
Show Templates For , -
Add, -
Standard.
Templates Directory , -
.
. .
eVB , ,
. , Microsoft Visual Studio Borland
Delphi, eVB -
. .
File. .
New Project -
. .
eVB . -
, .
Open Project , ,
.
Save Project .
56 3. Pocket PC Visual Basic 3.0
Save Project As , -
.
Save .
Save As ,
.
Print ,
Print Setup.
Print Setup .
Make Project ,
eVB,
.vb.
List of Recently-Used Projects , -
.
Exit eVB.
,
.
.ebp ,
, ,
. ,
. , -
,
.
.ebf .
, , -
.
.frx -
. -
, , .
, , .
.bas .
, .
.ocx , -
ActiveX, eVB.
.vbw eVB. -
-
.
, ,
.
, , -
Project Explorer, . 3.15.
. . 57
. 3.15. Project Explorer
, -
. . -
.
,
, , .
. (Form2 Form3), -
, .
.
Project Explorer . -
. -
.
View Object View Code, -
View Code.
Print, -
, .
.
Remove, -
.
Visual Basic . -
.vb. ,
, .
.vb Pocket PC -
-, -
VB . , .vb -
.
Pocket PC 2002 VB
, , .
Pocket PC 2003 . -
58 3. Pocket PC Visual Basic 3.0
http://msdn.microsoft.com/mobility/windowsmobile/downloads/
evb_eula.aspx Microsoft
msvbppc. .cab
PocketPC, .
VB .
, Pocket PC 2003 -
Pocket PC 2002,
Pocket PC 2003.
,
Ctrl+F5 RunExecute. -
, -
(. 3.13).
, ,
ProjectProperties. -
. Project
Properties (. 3.16).
. 3.16.
, -
General.
Project Type .
.
Project Name . , -
-
. , -
.
. . 59
Project Description . -
, .
Startup Object , , -
.
.
Remote Path , -
. \Windows\
Start Menu\,
(. 3.17).
. 3.17. \Windows\Start Menu\
Run on Target , -
.
Pocket PC 2002.
Configure Target Platform
Manager, -
.
Frequency -
.
Always Ask , -
, .
Component to Update , ,
, .
Runtime Files VB.
Project Components ActiveX, .
Make ,
. Platform
,
.
60 3. Pocket PC Visual Basic 3.0
eVB
(Properties Window)
. . 3.18.
. 3.18.
.
-
.
1. . -
.
2. .
3. .
4. . -
. , ShowOK,
, ShowOK. -
.
5. ,
.
, 2 (. . 3.18)
, 3, -
.
eVB 61
eVB .
1. .
.
2. ,
. -
.
3. . -
. -
.
,
.
Form
Form
Form . 3.1.
3.1. Form
Show . -
Hide
Move
ZOrder
SetFocus
Refresh
Cls
DrawCircle
DrawLine
Point ,
PointSet
62 3. Pocket PC Visual Basic 3.0
( )
SetScale -
ScaleX , -
ScaleY , -
TextHeight , ,
TextWidth , ,
Form
. 3.2 Form.
3.2. Form
ActiveControl ,
AutoRedraw true,
,
false,
BackColor
BorderStyle
Caption
ClipControls false, ,
, -
, .
true, -
CurrentX
( )
CurrentY -
( )
DrawMode ( -
)
DrawStyle
(, , . .),
DrawWidth=1. ,
DrawWidth
Enabled ,
FillColor
FillStyle
Font Font
FontBold
eVB 63
FontItalic
FontName
FontSize
FontStrikethru
FontTransparent ,
FontUnderline
ForeColor ( )
FormResize . 0 , -
, . 1
, ,
. 2 ,
,
HDC , -
Height
HWnd , -
KeyPreview true , -
( )
, ,
Left
Moveable
Name ,
ScaleHeight -
. ScaleHeight=50
50 , -
ScaleLeft
ScaleMode
ScaleTop
ScaleWidth -
ShowOK true
SIPBehavior . 0 , -
. 1 , -
.
2 ,
SIPVisible
Tag , ,
Top
Visible
Width
WindowState . 0
, 1 , 2
64 3. Pocket PC Visual Basic 3.0
Form
Form.
. 3.3.
3.3. Form
Activate ,
Deactivate , , . . -
GotFocus ,
. ,
KeyDown ,
KeyPress , -
KeyUp ,
Load ,
LostFocus ,
MouseDown ,
MouseMove ,
MouseUp ,
OKClick OK
Paint ,
QueryUnload ,
Resize
SIPChange
Terminate
3.4
Form.
1. FormMethods,
FormMethods.ebp. Form1.
2. AddForm,
Form2.
3. Form1 , . 3.19.
4. , Form1 true
AutoRedraw 20 DrawWidth.
.
5. Project Explorer Form2.
. 3.4.
.
eVB 65
. 3.19. Form1
3.4. Form2
AutoRedraw true
BackColor
BorderStyle None
DrawWidth 10
FormResize vbFormUserSize
Height 2000
Width 2000
6. . Form2 -
Timer, . 3.20.
. 3.20. Form2
7. Timer1 Interval -
150.
8. Timer1 -
, -
3.3.
66 3. Pocket PC Visual Basic 3.0
3.3
Private Sub Timer1_Timer()i = i + aj = j + bIf i > 1600 Then a = -a: BackColor = &HFF&:DrawCircle 500, 500, 400, &HFF00FF:DrawLine 1100, 1100, 1800, 1800, &HFF00FF, vbLineBoxFillIf j > 2500 Then b = -b: BackColor = &HFFFF&:DrawCircle 500, 500, 400, &HFF00FF:DrawLine 1100, 1100, 1800, 1800, &HFF00FF, vbLineBoxFillIf i < 0 Then a = -a: BackColor = &HFF00&:DrawCircle 500, 500, 400, &HFF00FF:DrawLine 1100, 1100, 1800, 1800, &HFF00FF, vbLineBoxFillIf j < 0 Then b = -b: BackColor = &HFF0000:DrawCircle 500, 500, 400, &HFF00FF:DrawLine 1100, 1100, 1800, 1800, &HFF00FF, vbLineBoxFillMove i, j
End Sub
DrawCircle, DrawLine Move , Form2 -
.
9.
Option Explicit -, 3.4.
3.4
Dim a, b, i, ji = 0j = 0a = 100b = 50
10. Project Explorer Form1. -
Command1 Command2 Caption -
.
11. Command1
, 3.5.
3.5
Private Sub Command1_Click()If ShFrm2 Then
Form2.ShowShFrm2 = FalseCommand1.Caption = ""
ElseForm2.HideShFrm2 = TrueCommand1.Caption = ""
End IfEnd Sub
eVB 67
Show Hide Form2 Command1.
12. Command2
, 3.6.
3.6
Private Sub Command2_Click()ClsForm2.ZOrder vbBringToFront
End Sub
Cls Form1 -, ZOrder Form2 - . , -
Form1.
13. , 3.7.
3.7
Private Sub Form_Load()DrawLine 1100, 1100, 9000, 18000, &HFF&DrawLine 1100, 1100, 18000, 10000, &HFF&DrawLine 1100, 1100, 18000, 18000, &HFF&
End Sub
Form1 -
.
14. -
, .
, 3.8.
3.8
Option ExplicitDim ShFrm2 As BooleanShFrm2 = True
15. .
Pocket PC 2002 Emulation, Run
Execute. Form1
.
Form2 , -
(. 3.21).
Form2 -
. ,
Form1. -
Form2. ,
-
.
68 3. Pocket PC Visual Basic 3.0
. 3.21. FormMethods
3.5
, Form.
1. FormEvents.
2. TextBox, ListBox CommandButton
, . 3.22.
. 3.22.
3.
. . 3.5.
3.5.
Command1.Caption 1
Command1.Caption 2
Command1.Caption 3
eVB 69
4. .
. 3.6.
3.6.
BackColor
BorderStyle Sizable
ControlBox true
Height 3000
Left 1000
Top 1000
Width 3000
5. Project Explorer Form1.
, View Code -
, 3.9.
3.9
Rem Form2 Private Sub Command1_Click()Form2.ShowEnd Sub
Rem Form2Private Sub Command2_Click()Form2.HideEnd Sub
Rem Form2Private Sub Command3_Click()If Form2.Height > 2500 ThenForm2.Height = 1000: Form2.Width = 1000ElseForm2.Height = 3000: Form2.Width = 3000End IfEnd Sub
Private Sub Form_OKClick()App.End
End Sub
Rem Private Sub List1_DblClick()
List1.ClearEnd Sub
Rem Private Sub Form_SIPChange(ByVal IsV As Boolean)If IsV ThenList1.AddItem " "ElseList1.AddItem " "End IfEnd Sub
70 3. Pocket PC Visual Basic 3.0
Rem Private Sub Form_KeyDown(ByVal KeyCode As Integer, ByVal shift As Integer)
List1.AddItem "Text1_KeyDown"End Sub
Private Sub Form_KeyPress(ByVal KeyAscii As Integer)List1.AddItem "Text1_KeyPress"
End Sub
Private Sub Form_KeyUp(ByVal KeyCode As Integer, ByVal shift As Integer)List1.AddItem "Text1_KeyUp"
End Sub
Private Sub Form_MouseDown(ByVal button As Integer, ByVal shift As Integer, x, y)List1.AddItem "Form_MouseDown"End Sub
Private Sub Form_MouseUp(ByVal button As Integer, ByVal shift As Integer,_x, y)List1.AddItem "Form_MouseUp"End Sub
Rem , Rem Private Sub Form_MouseMove(ByVal button As Integer, ByVal shift As Integer, x, y)If button = 1 Then List1.AddItem "Form_MouseMove"End Sub
6. Project Explorer Form2. ,
3.10.
3.10
Private Sub Form_QueryUnload(ByVal cancel As Integer, unloadmode)Form1.List1.AddItem "Form2 QueryUnload"
End Sub
Private Sub Form_Activate()Form1.List1.AddItem "Form2 Activate"
End SubPrivate Sub Form_Deactivate()
Form1.List1.AddItem "Form2 Deactivate"End SubPrivate Sub Form_GotFocus()
Form1.List1.AddItem "Form2 "End SubPrivate Sub Form_LostFocus()
Form1.List1.AddItem "Form2 "End SubPrivate Sub Form_Paint()
Form1.List1.AddItem "Form2 "End Sub
Private Sub Form_Load()Form1.List1.AddItem "Form2 "
End Sub
Private Sub Form_Resize()Form1.List1.AddItem " Form2 Resize"
End Sub
eVB 71
7. RunExecute .
.
8. 1 , ListBox -
,
.
9. Form2 , .
, .
10. 3. -
Form1, Form2 . ,
Form2 , , ,
. , -
, .
11. 2. , -
.
12. . 3. -
Form2 . , ,
.
13. Form1 -
. ,
.
14. TextBox -
. .
. -
- , ,
, Down. Down, Press Up. - eVB ,
, Microsoft.
15. -
.
16. ,
Form2 Hide . QueryUnload.
, eVB, ,
. -
, ( ) .
, ,
,
, ,
.
17. , , -
QueryUnload, 3.11.
72 3. Pocket PC Visual Basic 3.0
3.11
Private Sub Form_QueryUnload(cancel, unloadmode)Form1.List1.AddItem "Form2 QueryUnload"cancel = 0
End SubPrivate Sub Form_Unload(cancel)
Form1.List1.AddItem "Form2 Unload"End Sub
cancel , , , - . , , -
. ,
, , .
Unload cancel = 0,
.
. 3.23 eVB. -
. -
.
. 3.23. eVB
1. Shape.
(, , , ,
). -
Shape. Move, Refresh ZOrder - Shape . Shape .
Shape .
2. Line. ,
. . Move Line , .
3. Label. .
Caption 1024 . Autosize ( ) WordWrap (-
eVB 73
, ,
).
Font Alignment. Label - Change, Caption.
Move, Refresh ZOrder.
4. TextBox. -
.
Text. MultiLine .
2048 ,
32 .
( Font) ( Alignment). , -
ScrollBars. - Text , , , -
.
SelLength ( ), SelStart ( , -) SelText (, ). , -
. ,
(KeyDown, KeyPress KeyUp). , eVB . -
3.5.
5. Frame. -,
. . -
. Frame
OptionButton, -
.
6. CommandButton. , -
. Click - CommandButton.
7. CheckBox. , -
.
Value. 0 , , - 1 , , 2 -
, .
CheckBox Click, Value, , .
8. OptionButton. , -
, . -
74 3. Pocket PC Visual Basic 3.0
, OptionButton CheckBox. , , OptionButton, .
9. ComboBox. , -
, .
.
, ,
Custom. (ListData) - (ItemData). , ListData, ItemData . Style - -
.
(SelLength, SelStart, SelText), TextBox.
. List , - . ListCount . ListIndex - . NewIndex - , TopIndex . -
. , Sorted true -
. -
AddItem RemoveItem, . Clear .
ComboBox . Change
. Click . Scroll.
10. ListBox. ComboBox TextBox ListBox, , , ListBox. ListBox . ,
. ,
ListBox . MultiSelect 1 - 2 - .
11. HScrollBar. . -
,
eVB 75
. Max - , Value. . Min - , Value. - Value , . LargeChange , - ,
. SmallChange - . ,
Scrollbar - Scroll ( ) Change (- Value - ).
12. VScrollBar. . -
HScrollBar.
13. Timer. -
Timer , Interval. Interval 1 65 535. , Enabled false.
eVB -
, , -
.
, , -
, .
.
, , . -
ActiveX. ActiveX ,
eVB . Visual Basic -
COM-,
, ActiveX.
ActiveX
ActiveX
ActiveX , -
.
ProjectComponents Ctrl+T. -
ActiveX- (. . 3.11).
,
, OK. -
. . 3.24 , -
MenuBar Control.
76 3. Pocket PC Visual Basic 3.0
. 3.24. MenuBar,
ActiveX
,
, ActiveX COM--
, -
, .
. , -
eVB.
. -
, -
.
ProjectProject Properties.
General Frequency Always,
Component to Update Project Components.
ActiveX .
, , , -
. , ,
.
ActiveX
Control Manager.
.
ToolsRemote ToolsControl Manager. -
, . 3.25.
,
( Pocket PC 2002 Emulation).
, -
ActiveX 77
( Microsoft CE Grid Control).
-
Install to Target. -
.
. 3.25. Control Manager
, -
. ( -
File Viewer ActiveSync), -
RegSvrCE.exe.
C:\Windows CE Files\wce300\Pocket PC 2002\target\arm C:\Windows CE
Files\wce300\Pocket PC 2002\target\x86. arm
, x86 . -
. -
arm x86 C:\Program
File\Windows CE Files\wce300\Pocket PC 2002\controls.
, RegSvrCE.exe , -
, , -
RegSvrCE.exe. -
, . 3.26.
,
, Register OK.
, -
(. 3.27).
. ,
.
.
.
.
78 3. Pocket PC Visual Basic 3.0
. 3.26. RegSvrCE.exe
. 3.27.
MenuBar
Pocket PC.
, -
. , -
. -
, .
.
Enabled -
. false.
NewButton true,
New. -
.
3.6
1. EnPhrase
EnPhrase.ebp.
ActiveX 79
2. Caption , -
Height 7050. -
, , VScrollBar.
3. Frame. -
3.7.
3.7. Frame
Height 4050
LargeChange 1000
Left 3360
Max 3000
Min 0
SmallChange 100
Width 255
4. Label. -
. 3.8.
3.8. Label1, Label2 Label3
Label1 Label2 Label3
BackStyle 1 1 1
BorderStyle 1 1 1
Caption "" "" ""
Height 1000 1000 1000
Left 120 120 120
Top 300 1350 1350
Width 3135 3135 3135
WordWrap true true true
5. CommandButton.
. 3.9.
3.9. Command1, Command2, Command3 Command4
Command1 Command2 Command3 Command4
Caption
3.10. ListBox
Columns 2
Font Tahoma, bold, 10
Height 30
Left 120
MultiSelect 0
Top 3000
Width 3135
7. .
, . 3.28.
. 3.28.
8. , , ,
, -
Change VScroll. - 3.12.
3.12
Private Sub VScroll1_Change()Frame1.Top = -200 - VScroll1.ValueEnd Sub
ActiveX 81
,
.
Value , -
, . -
-200 ,
.
9. , -
.
ProjectComponents Mic-
rosoft Pocket PC MenuBar Control. -
ProjectProject Properties|Update ComponentsAlways|Component to UpdatesPro-
ject Components.
10. , -
, MenuBar -
. NewButton false.
.
, , -
, . -
Form_Load().
11. ,
MenuBar. (
MenuBarMenu) ( MenuBarButton), - Pocket PC. MenuBar,
, Collection, , ImageList, - ,
. ButtonClick, MenuClick NewClick - , New .
AddButton AddMenu Collection. , , -
.
12. Form_Load(). - 3.13. ,
. -
.
3.13
Rem 1Dim mnuFile As MenuBarMenuRem 2Dim mnuSep, mnuClr1, mnuClr2, mnuClr3 As MenuBarButtonRem 3Set mnuFile = MenuBar1.Controls.AddMenu("", "mnuFile")Rem 4mnuFile.Items.Add 1, "itFont", " "
82 3. Pocket PC Visual Basic 3.0
Rem 5mnuFile.Items.Item(1).SubItems.Add 1, "itBold", ""mnuFile.Items.Item(1).SubItems.Add 2, "itItal", ""mnuFile.Items.Item(1).SubItems.Add 3, "itSize", ""Rem 6mnuFile.Items.Item(1).SubItems.Item(3).SubItems.Add 1, "it8", "* 8"mnuFile.Items.Item(1).SubItems.Item(3).SubItems.Add 2, "it10", "10"mnuFile.Items.Item(1).SubItems.Item(3).SubItems.Add 3, "it12", "12"Rem 7mnuFile.Items.Add 2, "", ""mnuFile.Items.Item(2).Style = mbrMenuSeparatorRem 8mnuFile.Items.Add 3, "itOpen", ""Rem 9mnuFile.Items.Add 5, "", ""mnuFile.Items.Item(5).Style = mbrMenuSeparatorRem 10mnuFile.Items.Add 6, "itExit", " "Rem 11Set mnuSep = MenuBar1.Controls.AddButton("mnuSep")mnuSep.Style = mbrSeparatorRem 12Set mnuClr1 = MenuBar1.Controls.AddButton("1")mnuClr1.Style = mbrButtonGroupmnuClr1.Caption = " 1 "Set mnuClr2 = MenuBar1.Controls.AddButton("2")mnuClr2.Style = mbrButtonGroupmnuClr2.Caption = " 2 "Set mnuClr3 = MenuBar1.Controls.AddButton("3")mnuClr3.Style = mbrButtonGroupmnuClr3.Caption = " 3 "Rem 13Frame1.Top = -200List1.ClearEnd Sub
13. . -
.
1) MenuBarMenu. , , .
2) MenuBarButton. -, , .
3) MenuBarMenu . mnuFile, , ,
mnuFile.
4) , -
Items. - Add, . . -
Add (1), - (itFont) , . ,
ActiveX 83
, ,
Item.
5) . -
SubItems. Add.
, .
6) 8, 10 12. -
8 ,
.
7) , ,
-
,
.
8) .
9) .
10) .
11) . -
(mbrSeparator). , - .
12) .
mbrButtonGroup. , - .
13) .
.
14.
. 3.14.
3.14
Private Sub MenuBar1_ButtonClick(ByVal Button As MenuBarLib.MenuBarButton)Select Case Button.KeyCase "1"
Label1.BackColor = &H80000005Label2.BackColor = &H80000005Label3.BackColor = &H80000005List1.BackColor = &H80000005
Case "2"Label1.BackColor = &HC0FFFFLabel2.BackColor = &HC0FFFFLabel3.BackColor = &HC0FFFFList1.BackColor = &HC0FFFF
Case "3"Label1.BackColor = &HC0FFC0Label2.BackColor = &HC0FFC0Label3.BackColor = &HC0FFC0List1.BackColor = &HC0FFC0
End SelectEnd Sub
84 3. Pocket PC Visual Basic 3.0
ButtonClick Button, (Button.Key) , . Select . -
, .
15. , -
, 3.15.
3.15
Private Sub MenuBar1_MenuClick(ByVal Menu As MenuBarLib.MenuBarMenu)Select Case Menu.KeyCase "itExit"
App.EndEnd SelectEnd Sub
MenuClick Select ( ) .
16. .
-
,
. , -
. 3.29.
. 3.29.
17. ActiveX -
Microsoft CE Image List Control. .
MenuBar, ImageList -
, .
18. ImageList, .
.
ActiveX 85
1616, 256 , white.bmp,
yellow.bmp green.bmp. -
1414 , , -
. .
19. -
ProjectAdd File. , , -
All Files (*.*), Add As Related Document,
OK.
. -
. ,
, . 3.30.
. 3.30.
20. ImageList. - Form_Load() , 3.16.
3.16
Dim imLst As ImageListSet imLst = ImageList1imLst.Add "\Windows\Start Menu\white.bmp"imLst.Add "\Windows\Start Menu\yellow.bmp"imLst.Add "\Windows\Start Menu\green.bmp"MenuBar1.ImageList = imLst.hImageList
ImageList. ImageList1, . -
MenuBar1. - .
\Windows\Start Menu\, -
.
21. , Caption , Caption - . ImageList MenuBar Form_Load, -
ImageList, 3.17.
86 3. Pocket PC Visual Basic 3.0
3.17
Rem mnuClr1.Caption = " 1 "mnuClr1.Image = 1
Rem mnuClr2.Caption = " 2 "mnuClr2.Image = 2
Rem mnuClr3.Caption = " 3 "mnuClr3.Image = 3
22. , -
.
23. ,
,
,
, -
, ,
ListBox.
24. .
, phrase.txt . -
3.18.
3.18
Kak delaVsego horoshegoDo vstrechihow are yougood lucksee you later
25. , .
, -
. -
Pocket PC 2003 .
26. , ActiveX File
System Common Dialog. ,
. File System
File FileSystem. FileSystem -
, , , -
, , .
, File,
,
.
27.
, 3.19.
3.19
Option ExplicitDim intText, intInt, intStep, intCount As IntegerDim varText, varEnText
ActiveX 87
Dim varStrng As StringRem FileDim flFile As FileSet flFile = File1Rem Dim fdOpen As CommonDialogSet fdOpen = CommonDialog1
28. -
. Private Sub MenuBar1_MenuClick Case. , 3.20.
3.20
Private Sub MenuBar1_MenuClick(ByVal Menu As MenuBarLib.MenuBarMenu)Select Case Menu.KeyCase "itExit"
App.EndCase "itOpen"
Rem 1fdOpen.ShowOpenRem 2If fdOpen.FileName "" ThenRem 3flFile.Open fdOpen.FileName, fsModeInput, , , 1Rem 4intText = 0While Not flFile.EOF
intText = intText + 1flFile.LineInputString
WendRem 5flFile.CloseflFile.Open fdOpen.FileName, fsModeInput, , , 1Rem 6For intCount = 1 To intText
varText = flFile.LineInputStringIf intCount > intText/2 Then varEnText=varEnText +" "+varText
NextintStep = 1flFile.CloseRem 7flFile.Open fdOpen.FileName, fsModeInput, , , 1For intCount = 1 To intText
varText = flFile.LineInputStringIf intCount = intStep Then Label1.Caption = varTextIf intCount = intStep+intText/2 Then Label2.Caption=varText
NextRem 8intStep = 2flFile.CloseDim strArDim strSt As StringRem 9varEnText = Trim(varEnText)Rem 10strAr = Split(varEnText, " ", -1, vbTextCompare)
88 3. Pocket PC Visual Basic 3.0
Rem 11intInt = 10000For intCount = 0 To intInt
On Error Resume NextList1.AddItem strAr(intCount)If Err.Number Then
Err.Clear: Exit ForEnd If
NextRem 12Dim intCount2 As IntegerFor intCount = 1 To List1.ListCount
For intCount2 = intCount + 1 To List1.ListCountIf (StrComp(List1.List(intCount), List1.List(intCount2), vbTextCompare) = 0)
ThenList1.RemoveItem (intCount2): intCount2=intCount2-1
End IfNext
NextEnd If
End SelectEnd Sub
, .
1) .
2) ,
3.
3) File.
4) intText, .
5) LineInputString .
6)
varEnText.
7) Label1, - Label2.
8) .
9) .
10) varEnText , strAr. , , .
11) intInt , 10 000 . List1 , - .
, On Error ResumeNext. Err.Number - , Err.Clear , Exit For .
12) .
ActiveX 89
29. -
. .
30. , -
Label3. 3.21.
3.21
Private Sub List1_Click()varStrng = Label3.CaptionLabel3.Caption = Label3.Caption + List1.List(List1.ListIndex) + " "End Sub
Label3 varStrng.
31. Caption Label3 , 3.22.
3.22
Private Sub Command2_Click()Label3.Caption = ""End Sub
32. ,
3.23.
3.23
Private Sub Command3_Click()Label3.Caption = varStrngEnd Sub
33. . -
Label2 Label3, -
. ,
3.24.
3.24
Private Sub Command4_MouseDown(button, shift, x, y)Label2.ZOrder vbBringToFrontEnd SubPrivate Sub Command4_MouseUp(button, shift, x, y)Label2.ZOrder vbSendToBackEnd Sub
34. .
, , -
. , -
3.25.
3.25
Private Sub Command1_Click()If intText 0 ThenIf StrComp(Trim(Label2.Caption), Trim(Label3.Caption), vbTextCompare) = 0 Then
90 3. Pocket PC Visual Basic 3.0
MsgBox ", ! ! ", vbOKOnlyflFile.Open fdOpen.FileName, fsModeInput, , , 1For intCount = 1 To intText
varText = flFile.LineInputStringIf intCount = intStep Then Label1.Caption = varTextIf intCount = intStep + intText / 2 Then Label2.Caption = varText
NextflFile.CloseLabel3.Caption = ""If intStep > intText / 2 Then
MsgBox " ", vbOKOnlyApp.EndEnd If
intStep = intStep + 1Else
MsgBox " , ", vbOKOnlyEnd IfEnd IfEnd Sub
35. .
.
-
MenuBar1_MenuClick Case, 3.26.
3.26
Case "itBold"If mnuFile.Items.Item(1).SubItems(1).Caption = "" Then
Label1.FontBold = TrueLabel2.FontBold = TrueLabel3.FontBold = TrueList1.FontBold = TruemnuFile.Items.Item(1).SubItems(1).Caption = "*"
ElseLabel1.FontBold = FalseLabel2.FontBold = FalseLabel3.FontBold = FalseList1.FontBold = FalsemnuFile.Items.Item(1).SubItems(1).Caption = ""
End IfCase "itItal"
If mnuFile.Items.Item(1).SubItems(2).Caption = "" ThenLabel1.FontItalic = TrueLabel2.FontItalic = TrueLabel3.FontItalic = TrueList1.FontItalic = TruemnuFile.Items.Item(1).SubItems(2).Caption = "*"
ElseLabel1.FontItalic = FalseLabel2.FontItalic = FalseLabel3.FontItalic = FalseList1.FontItalic = FalsemnuFile.Items.Item(1).SubItems(2).Caption = ""
End IfCase "it8"
If mnuFile.Items.Item(1).SubItems(3).SubItems(1).Caption = "8" Then
ActiveX 91
3.26 ()
Label1.FontSize = 8Label2.FontSize = 8Label3.FontSize = 8List1.FontSize = 8mnuFile.Items.Item(1).SubItems(3).SubItems(1).Caption = "*8"mnuFile.Items.Item(1).SubItems(3).SubItems(2).Caption = "10"mnuFile.Items.Item(1).SubItems(3).SubItems(3).Caption = "12"
End IfCase "it10"
If mnuFile.Items.Item(1).SubItems(3).SubItems(2).Caption = "10" ThenLabel1.FontSize = 10Label2.FontSize = 10Label3.FontSize = 10List1.FontSize = 10mnuFile.Items.Item(1).SubItems(3).SubItems(1).Caption = "8"mnuFile.Items.Item(1).SubItems(3).SubItems(2).Caption = "*10"mnuFile.Items.Item(1).SubItems(3).SubItems(3).Caption = "12"
End IfCase "it12"
If mnuFile.Items.Item(1).SubItems(3).SubItems(3).Caption = "12" ThenLabel1.FontSize = 12Label2.FontSize = 12Label3.FontSize = 12List1.FontSize = 12mnuFile.Items.Item(1).SubItems(3).SubItems(1).Caption = "8"mnuFile.Items.Item(1).SubItems(3).SubItems(2).Caption = "10"mnuFile.Items.Item(1).SubItems(3).SubItems(3).Caption = "*12"End If
36. . -
, . -
. ,
. -
, , .
- ,
. , ,
, - .
eVB
, , ,
, , -
, .
,
.
,
ToolsRemote ToolsApplication Install Wizard.
.
1. .
2. .ebp
92 3. Pocket PC Visual Basic 3.0
3. , -
.vb. ,
. ,
FileMake Project.vb.
4. ,
. , .
C:\MyInstall.
5. Arm 1100 (4K) v 3.00.
6. ,
. -
, , -
.
7. ,
. white.bmp, green.bmp,
yellow.bmp phrase.txt. , -
Is this a System file? -
, .
,
Windows . Pocket
PC 2002, Include Device Runtime in Cab file. -
Pocket PC 2003 , , , -
Pocket PC 2003 VB.
8. 4 . Default Install Directory -
, . -
EnPhrase. Application Name
, -
. EnPhrase.
Description . Company Name -
, .
, -
.
9. Create Install.
.
C:\MyInstall\CD1. -
, .
, , . ,
\Windows\Start Menu\, -
. -
. , -
eVB. ,
, 3.27.
App.Path , - .
eVB 93
Pocket PC,
phrase.txt, -
.
, C:\MyInstall\CD1 Setup.exe.
3.27
Dim imLst As ImageListSet imLst = ImageList1MsgBox App.Path, vbOKOnlyimLst.Add (App.Path + "\white.bmp")imLst.Add (App.Path + "\yellow.bmp")imLst.Add (App.Path + "\green.bmp")MenuBar1.ImageList = imLst.hImageList
, , ,
.
. -
.
3.7
1. . FileNew Project
Windows CE Formless
Project.
2. ,
, 3.28.
3.28
Option ExplicitSub Main()End Sub
3. FLess.ebp. -
, 3.29.
3.29
Sub Main()MsgBox " ", vbOKOnlyEnd Sub
4. . , -
OK .
5. Main .
eVB -
.
. , ,
, , .
94 3. Pocket PC Visual Basic 3.0
6. , -
. ,
3.30.
3.30
Sub Main()If MsgBox(" ?", vbYesNo) = vbYes Then
Form1.ShowElse
App.EndEnd IfEnd Sub
7. , -
, 3.31.
3.31
Private Sub Form_OKClick()App.EndEnd Sub
8. , , .
No ,
Yes .
eVB CE API
, eVB , -
ActiveX ,
. , eVB , -
Windows CE, CE API.
CE API
declare , .
CE API PlaySound If, . - 3.32.
Option Explicit Coredll.dll - PlaySoundW, PlaySound. -
, Pocket PC.
CE API
WCESDKR.CHM, -
\Windows CE Files\Htmlhelp\emtools SDK. -
WINCEAPI.TXT ( Windows CE Files\BIN -
SDK),
CE API.
95
3.32
Option ExplicitDeclare Function PlaySound Lib "Coredll" Alias "PlaySoundW" (ByVal lpszName As String,
ByVal hModule As Long, ByVal dwFlags As Long) As Long
Sub Main()If MsgBox(" ? ", vbYesNo) = vbYes Then
Form1.ShowElse
PlaySound "Alarm1.wav", 0, 0PlaySound "Alarm2.wav", 0, 0PlaySound "Alarm3.wav", 0, 0PlaySound "Alarm4.wav", 0, 0App.End
End IfEnd Sub
eVB
eVB .
. ,
Devices, -
Pocket PC.
, -
, -
. eVB -
.
3.8
1. , 3.7, , -
3.33.
3.33
Sub Main()Dim A, B As IntegerDim C As DoubleIf MsgBox(" ?", vbYesNo) = vbYes ThenForm1.ShowElsePlaySound "Alarm1.wav", 0, 0PlaySound "Alarm2.wav", 0, 0PlaySound "Alarm3.wav", 0, 0PlaySound "Alarm4.wav", 0, 0A = 10B = 20C = Mult(A, B)App.EndEnd IfEnd Sub
Function Mult(ByVal One, Two As Integer) As DoubleOne = One + 5
96 3. Pocket PC Visual Basic 3.0
Two = Two - 3Mult = (One * 10 + Two * 10) / Add(One, Two)End Function
Function Add(ByVal my1, my2 As Integer) As DoubleAdd = Sqr(my1) + Sqr(my2)End Function
2. A, B C. Mult() Add(), Main(). , ( )
. .
3. , -
. ,
(. 3.31).
. 3.31.
-
.
1) ;
2) ;
3) ;
4) ;
5) ;
6) ;
7) ;
8) ;
9) ;
10) .
4. . -
,
(. 3.32).
ToggleBreakpoint.
, -
.
(3) -
.
eVB 97
, ,
, -
.
. 3.32.
, . -
(
) (
).
5. A = 10. - , -
.
F5, . -
, ,
, ,
.
Shift+F8,
F8. , ,
.
6. -
, .
. Watch
Window. ViewWatch Window, -
Watches, -
.
Watches,
98 3. Pocket PC Visual Basic 3.0
Add Watch. -
(. 3.33).
. 3.33. Watches
Watches , ,
, ,
Form1.Color. Watches -
. .
. 3.34 Watches .
. 3.34. Watches
, -
Quick Watch.
, -
. -
, (. 3.35).
. 3.35. Quick Watch
, , . -
, -
(. 3.36).
eVB 99
. 3.36.
Watches , . 3.34,
-
.
( -
) , . ,
Watches ,
.
(Immediate Window)
eVB. ViewImme-
diate Window.
Basic , -
-
.
Immediate Enter,
. -
, ? , ?B.
, Immediate,
.
, Immediate, -
MsgBox " !", vbOKOnly - Enter. -
.
.
,
, (. 3.37).
. 3.37.
100 3. Pocket PC Visual Basic 3.0
4
Pocket PC Microsoft
eMbedded Visual C++ 3.0
eVB C++, , -
. eVB ,
eVC ( eMbedded Visual
C++ 3.0), eVB -
, C++.
eVC ,
, , -
. , eVC -
. , eVC eVB Delphi,
.
-
. . -
,
,
.
. -
eVC, ,
eVC++ 4.0
Pocket PC 2003.
, eVC,
++. ++, - ,
, .
, ,
++,
eVC. -
.
4.1
1. eVC FileNew.
New. Projects
WCE Pocket PC 2002 Application.
Project Name MyExp. -
OK.
2.
An Empty Project Finish.
3. FileNew.
Files C++ Source File. -
Add To Project MyExp.
4. FileNew. ,
, Files C/++
Header File. Add To Project MyExp. -
eVC. -
.
5. MyExp.h , 4.1.
4.1
// 1#define dim(x) (sizeof(x) / sizeof(x[0]))// 2struct decodeUINT {UINT Code;LRESULT (*Fxn)(HWND, UINT, WPARAM, LPARAM);};// 3struct decodeCMD {UINT Code;LRESULT (*Fxn)(HWND, WORD, HWND, WORD);};// 4int InitApp (HINSTANCE);int InitInstance (HINSTANCE, LPWSTR, int);int TermInstance (HINSTANCE, int);int MyPaint (HWND, UINT, WPARAM, LPARAM);// 5LRESULT CALLBACK MainWndProc (HWND, UINT, WPARAM, LPARAM);// 6LRESULT DoDestroyMain (HWND, UINT, WPARAM, LPARAM);LRESULT CharRec (HWND, UINT, WPARAM, LPARAM);
Save All .
.
6. MyExp.cpp , 4.2.
102 4. Pocket PC Visual C++ 3.0
4.2
// 1#include #include "MyExp.h"
// 2const TCHAR szAppName[] = TEXT ("MyEx