64
Concepts

Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

  • Upload
    others

  • View
    18

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Concepts

Concepts.book Page 1 Lundi, 29. août 2005 6:40 18

Page 2: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

WinDev MobileDocumentation US - 0905 - 1

Visit the download center at www.windev.com to check for updates.

This documentation is not contractually binding. Modifications may have been made tothe software the since this guide was published. Please consult the online help.

All product names or other trademarks mentioned in this publication are registered trademarks of their respective owners. © PC SOFT 2005: This publication may not be reproduced in part or in whole in any form without the express permission of PC SOFT.

Concepts.book Page 2 Lundi, 29. août 2005 6:40 18

Page 3: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Win

Dev M

ob

ile C

on

cep

ts

3

SUMMARY

PART 1 - DEVELOPING AN APPLICATION 5Development environment ........................................................................................................................................ 7Developing an application for Pocket PC ................................................................................................................. 8Window types ............................................................................................................................................................. 9Window controls .......................................................................................................................................................10Menus .......................................................................................................................................................................11Reports .....................................................................................................................................................................12ActiveSync ................................................................................................................................................................13Testing a WinDev Mobile application .....................................................................................................................14Installing an application for Pocket PC ..................................................................................................................15

PART 2 - DATABASE 17Data handled by an application for Pocket PC ......................................................................................................19Hyper File Mobile database ....................................................................................................................................20Standard CE database ............................................................................................................................................22Handling custom CE databases ..............................................................................................................................24Using W-Language to handle CE databases ..........................................................................................................27Hyper File Mobile vs. CE Database .........................................................................................................................28Data synchronization ...............................................................................................................................................30

PART 3 - PROGRAMMING IN W-LANGUAGE 31W-Language functions .............................................................................................................................................33Handling character strings ......................................................................................................................................34File picker and paths on Pocket PC ........................................................................................................................36Keypad management ..............................................................................................................................................37Functions specific to Pocket PC ..............................................................................................................................38Functions and properties not available in Pocket PC ...........................................................................................39

PART 4 - COMMUNICATION 43Communication with WinDev Mobile .....................................................................................................................45Email management via POP3/SMTP ......................................................................................................................48Email management via CEMAPI .............................................................................................................................49Handling files on an FTP server ..............................................................................................................................51Sending an SMS ......................................................................................................................................................52

PART 5 - INTERACTIONS WINDEV AND WINDEV MOBILE 53Interaction with a standard WinDev application ...................................................................................................55Pocket PC: Sharing WinDev elements ....................................................................................................................56Handling a Pocket PC from a standard WinDev application ................................................................................57

PART 6 - APPENDIX 59Tools available in WinDev Mobile ...........................................................................................................................61WinDev Mobile components ...................................................................................................................................62Examples provided with WinDev Mobile ................................................................................................................63

Concepts.book Page 3 Lundi, 29. août 2005 6:40 18

Page 4: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Win

Dev M

ob

ile C

on

cep

ts4

IN WHAT ORDER SHOULD THE GUIDES BE READ?

WinDev Mobile is a powerful tool to develop applications for Pocket PCs (Smartphone, Psion, etc.).

To learn quickly and efficiently how to use WinDev Mobile, we advise you to work in thefollowing order:

1 Read the "Concepts". This guide presents the main concepts needed to create a WinDev Mobileapplication.

2 "Tutorial" (book + exercises)The tutorial provides a first "hands-on" approach to WinDev Mobile, to familiarizeyourself with the main WinDev Mobile editors.

3 Test the examplesTest the examples delivered with WinDev Mobile in the fields you are interested in(Sending an SMS, Poll, etc.).

The online help lets you find the syntax of a W-Language function quickly, obtain help onthe interface, find the programming concepts linked to a function, etc.

We hope you enjoy getting started with WinDev Mobile.

Concepts.book Page 4 Lundi, 29. août 2005 6:40 18

Page 5: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Part 1 Developing an application

Concepts.book Page 5 Lundi, 29. août 2005 6:40 18

Page 6: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Concepts.book Page 6 Lundi, 29. août 2005 6:40 18

Page 7: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Part

1:

Develo

pin

g a

n a

pp

licati

on

7

DEVELOPMENT ENVIRONMENT

WinDev Mobile is a development environment for developing applications for Pocket PC,Smartphone, etc. on PC.

Note: Applications generated by WinDev Mobile only operate on the following platforms (equippedwith ARM, XScale, Samsung and ARM-compatible processors) : •Pocket PC (2002, 2003, etc.)•Windows Mobile Telephone (Smartphone, etc.)•Windows CE 3 and 4 (Psion, etc.)

These applications do not operate on Windows PCs.

Note: In this guide, the term "Pocket PC" is used for all types of platforms (Pocket PC, Smartphone,Psion, etc.). For special cases, the name of the platform involved is specifically mentioned.

Windows PC

Pocket PC

Using the WinDev Pocket

application

Connection: USB, Wi-fi, BlueTooth...

SETUP ordirect COPYGO

Running theapplicationtest

Creating the executable

InstallingWinDev Mobile

Developing theapplication

Concepts.book Page 7 Lundi, 29. août 2005 6:40 18

Page 8: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Part

1:

Develo

pin

g a

n a

pp

licati

on

8

DEVELOPING AN APPLICATION FOR POCKET PC

Setup

Preparing forsetup

Creating the executable

Running the

application test

GOGO

Library(*.WDL)

Executable(*.EXE)

Development

- Project RAD- Window RAD- Queries- Report- Source code

Creating the analysis

Creating the project

Importing existing files

Specifications

Concepts.book Page 8 Lundi, 29. août 2005 6:40 18

Page 9: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Part

1:

Develo

pin

g a

n a

pp

licati

on

9

WINDOW TYPES

WinDev Mobile applications can use two types of windows: •Maximized (the most commonly-used windows). It takes up the entire screen on a Pocket PC. •Not maximized. A window that can be resized by the user and only take up part of the screen.

Maximized windowsThe main features of a full-screen window are:

Not maximized windowsThe main features of a resizable window are:

"OK/Close" buttonThe "OK/Close" is used to close or validate the current window. It is linked to a specific windowprocess ("Before closing with OK/Close button") run before the window closing code.

Concepts.book Page 9 Lundi, 29. août 2005 6:40 18

Page 10: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Part

1:

Develo

pin

g a

n a

pp

licati

on

10

WINDOW CONTROLS

WinDev Mobile offers a number of different controls:

Differences compared to standard WinDevThe following controls do not exist in WinDev Mobile:

If you want .... The type of control to useis:

To display text, a title, etc. Static

To display a price, a quantity, an address, a date, a time, etc Edit control

To select a value from a list (country, city, etc.) Radio button, Combo box, Listbox, ListView

To select several values from a list Check box, List box

To display a graphic image (photo, statistics chart, linechart, etc.)

Image

To display an animation (animated Gif) Image

To display the content of a file in a table (customer list, orderdetails, etc.)

Browsing table, memory table

To enter data Edit control

To display the progress of an operation Progress bar

To program an action in a window (display another window,run a print operation, etc.)

Button

To group controls by theme and display the themes one byone

Tab, toolbox

•Web Camera.•Conference.•OLE.•ActiveX.

•HTML.•Toolbar.•Bar code.

Concepts.book Page 10 Lundi, 29. août 2005 6:40 18

Page 11: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Part

1:

Develo

pin

g a

n a

pp

licati

on

11

MENUS

Menus created with WinDev Mobile automatically adapt to the platform used.

Pocket PC Smartphone

The menus display at the bottom of thewindow.

Menu items are easily selected with PocketPC stylus.

The menus display at the bottom of thewindow.

Menu items are automaticallynumbered: the numbers are addedbeside the caption of each subitem. Theyare used to access the subitems bypressing the SmartPhone keys. The menu items can also be accessedwith the "joystick" on the Smartphone.Note: Only two menus can be displayedat once in an application forSmartphone. They are usually accessedby the buttons just below theSmartphone screen.

Concepts.book Page 11 Lundi, 29. août 2005 6:40 18

Page 12: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Part

1:

Develo

pin

g a

n a

pp

licati

on

12

REPORTS

The WinDev Mobile report editor enables you to easily create and print reports, whether they aresimple or complex.When a report is generated, it can be printed in PCL format (".PCL" file, or on a PCL printer).

Other print modesWinDev Mobile can also be used to print in W-Language (iXXX functions). You can also send the command sequences directly to a printer (if it is not in PCL format).

Report

Print (PCL format)

PCL file

Queries

Table Controls

Report Sources

Data Files

Text filesTxt

Concepts.book Page 12 Lundi, 29. août 2005 6:40 18

Page 13: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Part

1:

Develo

pin

g a

n a

pp

licati

on

13

ACTIVESYNC

ActiveSync is software for synchronizing data (WinDev application, emails, schedules, contacts,tasks, notes, etc.) between a PC and a Pocket PC.ActiveSync is usually supplied with a Pocket PC. It can also be downloaded from the Internet.ActiveSync is automatically run on the PC when a Pocket PC is plugged into it. Data synchronization parameters are set in ActiveSync ("Options" icon).

Features of ActiveSyncActiveSync is used to: •synchronize data between a PC and a Pocket PC. For more details, See "Data synchronization",

page 30. •access a Pocket PC via a standard WinDev application.•use a CE database via a standard WinDev application.•view files on a Pocket PC via a PC ("Explore" icon).•copy a file from a PC to a Pocket PC (with the file explorer).•automatically convert files copied on Pocket PC. The copied files will be in the format managed by

the Pocket PC (e.g. a ".DOC" file is converted into a ".PSW" file).•save data on a Pocket PC ("Tools .. Backup/Restore" option).•add and/or delete applications on a Pocket PC ("Tools .. Add/Remove Programs" option).• transfer Access databases to and from a Pocket PC ("Tools .. Import/Export Database Tables"

option). Access databases correspond to CE databases on a Pocket PC.•and more.

Concepts.book Page 13 Lundi, 29. août 2005 6:40 18

Page 14: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Part

1:

Develo

pin

g a

n a

pp

licati

on

14

TESTING A WINDEV MOBILE APPLICATION

A whole project is tested to simulate an application’s launch by the executable program. Thismeans the entire application can be tested, even though its development is not complete.

WinDev Mobile has two types of project test: •Test on the development workstation: this test simulates a Pocket PC on the development

workstation. A Pocket PC does not need to be plugged in for this test. It is designed for runningthe debugger. However, as it is run on a PC and not on a Pocket PC, the application may behavedifferently in some ways.

•Test on the Pocket PC plugged into a PC. In this case, the project’s executable prgram is created,copied directly on the Pocket PC and run. When the program is run on the Pocket PC, the PocketPC can be disconnected from the PC. The debugger is not available.

PC

Development Workstation GO

GOSimulator

Test Mode

PC

Pocket PC

Test on developmentworkstation

Test on Pocket PC

Concepts.book Page 14 Lundi, 29. août 2005 6:40 18

Page 15: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Part

1:

Develo

pin

g a

n a

pp

licati

on

15

INSTALLING AN APPLICATION FOR POCKET PC

There are two ways to install a WinDev application on a Pocket PC :•directly copy the executable program from a PC to a Pocket PC.•via a setup program run on a PC for Window connected to a Pocket PC.

Direct copyThis feature is used to:•create the application’s executable program on the development workstation using WinDev

Mobile.•automatically copy the program on the Pocket PC plugged into the workstation.To use the application, run the executable program on the Pocket PC (e.g., double-click the ".EXE"file).

Pocket PC

Execution

DeploymentDevelopment

Creating the executable

(Pocket EXE)Connection: USB, Wi-fi, BlueTooth...

Direct COPY

Windows PC

Concepts.book Page 15 Lundi, 29. août 2005 6:40 18

Page 16: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Part

1:

Develo

pin

g a

n a

pp

licati

on

16

Via a PC for WindowsWith this setup method, you:

•create the application’s executable program on the development workstation using WinDevMobile.

•generate the application’s setup program on the development workstation using WinDev Mobile.This program corresponds to an ".MSI" file.

•distribute the setup program to your end end-users. •run the setup program on a PC for Windows. The application will be automatically installed on the

Pocket PC plugged into the workstation.

To use the application, run it on the Pocket PC (e.g., double-click the ".EXE" file).

Lancement del’installation

Windows PC

Client 1

Running setup

Pocket PC

Deployment 1

PocketExe

Connection

SETUP

Windows PC

Development computer

Distribution

Distribution

Creating theexecutable

(Pocket Exe)

Creating setup(.MSI file)

Client 2 ...

Client N ...

Concepts.book Page 16 Lundi, 29. août 2005 6:40 18

Page 17: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Part 2 Database

Concepts.book Page 17 Lundi, 29. août 2005 6:40 18

Page 18: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Concepts.book Page 18 Lundi, 29. août 2005 6:40 18

Page 19: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Part

2:

Data

bases

19

DATA HANDLED BY AN APPLICATION FOR POCKET PCThe source of data handled by a WinDev Mobile application can be:

•a Hyper File Mobile database (".Fic" files)

•a CE database (".cdb" files)

• ".INI" files

•text files (in ANSI or UNICODE format)

• the registry

Pocket PC

Text files

ASCII

UNICODE

RegistryDatabases

.INI

Concepts.book Page 19 Lundi, 29. août 2005 6:40 18

Page 20: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Part

2:

Data

bases

20

HYPER FILE MOBILE DATABASE

The Hyper File Mobile format is the database format provided with WinDev Mobile. It is compatiblewith WinDev, WinDev Mobile and WebDev.

It is a freely distributable Relational DBMS.

It is in the same format as the standard WinDev and WebDev Hyper File (".WDD" file, data files,etc.).

However, a Pocket PC is small and its operating system is limited, so the following features are notsupported by Hyper File Mobile:

•transactions•log operations•Hyper File replication•management of file and record locks•management of files in Hyper File 5.5 format

Concepts.book Page 20 Lundi, 29. août 2005 6:40 18

Page 21: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Part

2:

Data

bases

21

Handling a Hyper File Mobile database via a Pocket PCA Hyper File Mobile database corresponds a set of ".FIC", ".NDX" and ".MMO" files.Each data file can be handled by a WinDev Mobile application using Hyper File functions (Hxxx).

Database

Hxxxfunctions(Read, Write, ...)

Pocket PC

WinDev Mobileapplication

Concepts.book Page 21 Lundi, 29. août 2005 6:40 18

Page 22: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Part

2:

Data

bases

22

STANDARD CE DATABASE

Standard Pocket PC applicationsPocket PCs include a set of standard applications to handle standard CE databases.

These databases are the default ones on Pocket PCs. They contain the "Tasks", "Contacts","Schedule" data files and so on.

They can be handled by a WinDev Mobile application.

Inbox

Notes

31 01

Calendar

Contacts Tasks

Databases of standard Pocket PCapplications

WinDev Mobileapplication

cdbxxxfunctions (Read, write)

Pocket PC

Concepts.book Page 22 Lundi, 29. août 2005 6:40 18

Page 23: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Part

2:

Data

bases

23

Handling a standard Pocket PC database (via a PC)

A Pocket PC has a standard database with the "Tasks," "Contacts", "Schedule" data files and so on.It can be handled by a WinDev Mobile application.If you have the standard WinDev, you can also create a WinDev application to handle the standardPocket PC database.This is done with cdbXXX functions.You use ActiveSync to synchronize the Pocket PC database with the data viewed via Outlook.

Note: To handle a Pocket PC database via a standard WinDev application, the Pocket PC must beplugged into a Windows PC (ceConnect function).

Windows PC

WinDevApplication

Standarddatabase

Pocket PC

WinDev MobileApplication

cdbxxxfunctions (Read, Write, ...)

Outlook

Synchronization via ActiveSync

Connection: USB, Wi-fi, BlueTooth...

cdbxxx functions (Read, Write...)

Concepts.book Page 23 Lundi, 29. août 2005 6:40 18

Page 24: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Part

2:

Data

bases

24

HANDLING CUSTOM CE DATABASES

CE databaseCustom CE databases correspond to Access databases (".MDB" file) which have been exportedfrom a PC.When an Access database is copied (".MDB" file) to a Pocket PC via a file explorer, it is automaticallyconverted into a CE database (".CDB" file).

Handling a CE database on a Pocket PCA CE database can be handled by a WinDev Mobile application using cdbXXX functions.

Database

cdbxxxfunctions(Read, Write, ...)

Pocket PC

WinDev MobileApplication

Concepts.book Page 24 Lundi, 29. août 2005 6:40 18

Page 25: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Part

2:

Data

bases

25

Handling a CE database via a Windows PC

If you have the standard WinDev, you can create a WinDev application to handle a CE database ona Pocket PC, also using cdbXXX functions.

Note: To handle a Pocket PC database via a standard WinDev application, the Pocket PC must beplugged into a Windows PC (ceConnect function).

Windows PC

WinDevApplication

Database

Pocket PC

WinDev MobileApplication

Connection: USB, Wi-fi, BlueTooth...

cdbxxx functions (Read, Write, ...)

cdbxxxfunctions(Read, Write...)

Concepts.book Page 25 Lundi, 29. août 2005 6:40 18

Page 26: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Part

2:

Data

bases

26

Synchronizing a CE database with an Access database

There is an Access database (".MDB" file) on the Windows PC. It is exported to a Pocket PC:ActiveSync automatically converts it into a Pocket PC database (".CDB" file). The Pocket PC database can be handled by a WinDev Mobile application.If you have the standard WinDev, you can create a WinDev application to handle a Pocket PCdatabase.This is done with cdbXXX functions. You use ActiveSync to synchronize the Pocket PC database andthe Access database.

Notes: •To handle a Pocket PC database via a standard WinDev application, the Pocket PC must be

plugged into a Windows PC (ceConnect function).•A standard WinDev application can also handle an Access database via Native Access.

Database

WinDevApplication

Database

cdbxxxfunctions(Read,Write...)

Windows PC Pocket PC

WinDev MobileApplication

Connection: USB, Wi-fi, BlueTooth...

Synchronization via ActiveSync

cdbxxx functions (Read, Write ...)

Concepts.book Page 26 Lundi, 29. août 2005 6:40 18

Page 27: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Part

2:

Data

bases

27

USING W-LANGUAGE TO HANDLE CE DATABASES

The W-Language functions for handling CE databases are:

cdbAdd Adds a stored record to a data file

cdbCancelSearch Cancels the current search criterion

cdbCol Returns a characteristic of a column in the current record

cdbDateTimeToInteger Changes a DateTime variable into a value compatible with a date and time column(unsigned integer on 8 bytes)

cdbWriteCol Modifies the value of a column in a stored record

cdbOut Points a record outside a file

cdbIntegerToDateTime Changes the value of a date and time column (unsigned integer on 8 bytes) into aDateTime variable

cdbClose Closes a database (".CDB" file)

cdbListFile Lists the data files in a CE database

cdbRead Reads a record in a file based on a record number

cdbReadLast Points the last record in a file and reads it

cdbReadPrevious Points the previous record in a file and reads it

cdbReadFirst Points the first record in a file and reads it

cdbReadSeek Points the first record in a file where the value of a specific column value is equalto the sought value

cdbReadNext Points the next record in a file and reads it

cdbModify Modifies a specified (or stored) record in a data file

cdbNbCol Returns the number of columns in a stored record

cdbNbRec Returns the number of records in a data file

cdbRecNum Returns the number of the current record in a data file

cdbOpen Opens a database (".CDB") on the Pocket PC plugged into the current workstation

cdbReset Resets all the variables of a standard database structure

cdbDelete Deletes the current record or a specified record from a data file

cdbFound Checks whether the current record matches the current search

Concepts.book Page 27 Lundi, 29. août 2005 6:40 18

Page 28: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Part

2:

Data

bases

28

HYPER FILE MOBILE VS. CE DATABASE

To display information from a database in a window, the controls in the window must be linked tothe database items.The way of displaying and retrieving information depends on the database used (Hyper File Mobileor CE).

File link between a window and a Hyper File Mobile databaseThe link between a control and an item is usually defined in the Window Editor when the control isdescribed ("File" tab). This link specifies which file item will be used with the ScreenToFile andFileToScreen functions.

HYPER FILE

Pocket PC

ScreenToFile FileToScreen

1 LINEPER WINDOW

( File link )

Concepts.book Page 28 Lundi, 29. août 2005 6:40 18

Page 29: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Part

2:

Data

bases

29

File link between a window and a Pocket PC (CE) databaseThis link can only be defined by programming (cdbXXX functions).

Other differencesBelow are just some of the features available with Hyper File Mobile databases: •Speed of Hyper File Mobile database.•Queries on Hyper File Mobile databases (created with the Query Editor). •Fast application development with Full Application RAD. •Exclusive Hyper File Mobile database functions (Encryption, etc.)

1 LINEPER CONTROL

CEDB

Pocket PC

ctlCaption=cdbCol("MyDataBase",...

"Schedule","Caption")

ctlContrib=cdbCol("MyDataBase",...

"Schedule","Contrib")

...

cdbWriteCol("MyDataBase",...

"Schedule","Caption",ctlCaption)

cdbWriteCol("MyDataBase",...

"Schedule","Contrib",ctlContrib)

...

( No file link )

Concepts.book Page 29 Lundi, 29. août 2005 6:40 18

Page 30: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Part

2:

Data

bases

30

DATA SYNCHRONIZATION

WinDev Mobile can be used to synchronize Hyper File records used by a standard WinDevapplication and a WinDev Mobile application.Both applications manage the same data independently of each other. When they aresynchronized, changes made in the database on the PC are automatically transferred to the PocketPC and vice-versa.Synchronization is done automatically via ActiveSync when the Pocket PC is plugged into the PC.Synchronization can be adapted to apply to specific cases. For instance, you can retrieve only therecords concerning a specified product or records created on a particular date, manage conflicts,display a configuration window, etc.Such adaptations must be programmed in a set of procedures called "WDSynchro.wdg". This issupplied as an example with WinDev Mobile.

Note: No programming is required for full synchronization.

Note: The WDSynchro tool can be used to configure ActiveSync to synchronize the Hyper Filedatabase (on PC) and the Hyper File Mobile database (on Pocket PC). This tool can only be used onthe development workstation.

File 2

File 1

File 3

File 2

File 1

Pocket PC

WinDevMobile

Application

Connection: USB, Wi-fi, BlueTooth...

Windows PC

WinDevApplication Synchronization via ActiveSync

ActiveSync

Concepts.book Page 30 Lundi, 29. août 2005 6:40 18

Page 31: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Part 3 Programming in W-Language

Concepts.book Page 31 Lundi, 29. août 2005 6:40 18

Page 32: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Concepts.book Page 32 Lundi, 29. août 2005 6:40 18

Page 33: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Part

3:

Pro

gra

mm

ing

in

W-L

an

gu

ag

e

33

W-LANGUAGE FUNCTIONS

Most of the W-Language functions in the standard WinDev are also available in WinDev Mobile.These functions are shared by both products. Only specific Windows functions are not available in WinDev Mobile, because Windows for PocketPC is more limited.

The diagram below shows the W-Language functions which can be used by each application:

WinDev functions for Windows only

WinDev Mobile functions only

Common functions

for instance: HReadFirst,

FileToScreen,ExtractString...

Functions not available due to the limits of Pocket PC (for

instance, fCurrentDir cannot be used as no current directory

exists on Pocket PC)

Functions that can only be used on Pocket PC(management of SIM card

for instance)

Concepts.book Page 33 Lundi, 29. août 2005 6:40 18

Page 34: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Part

3:

Pro

gra

mm

ing

in

W-L

an

gu

ag

e34

HANDLING CHARACTER STRINGS

There are two formats of character strings: •UNICODE is used to represent a very large set of characters with 2 bytes for each letter. This

format means that 65,536 characters can be encoded to represent all the characters of the 24most common charsets in a single set. Each character has a unique identifier, so characters fromdifferent charsets can be used at the same time.

•ANSI represents each character in one byte and can encode 256 characters in the Indo-Europeancharsets. This format can represent all charsets, but only one at a time.

Character strings in Pocket PCWindows applications for Pocket PC generally handle character strings in UNICODE format.

On Pocket PC, when text files containing character strings in ANSI format are used, WinDev Mobileautomatically converts the character strings to UNICODE format, even when it is specified that thefile must be opened in ANSI format.Conversion is completely transparent.

Pocket PC

S is string

...

or

UNICODEstring

Using Text files

UNICODEstring

UNICODEstring

fOpen(MyFile,ANSI)

fReadLine(...)

fOpen(MyFile,Unicode)

fReadLine(...)

ANSI

UNICODE

Concepts.book Page 34 Lundi, 29. août 2005 6:40 18

Page 35: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Part

3:

Pro

gra

mm

ing

in

W-L

an

gu

ag

e

35

Reminder: Character strings in Windows PCWindows applications for Windows PC handle character strings in ANSI format. On a PC, text files can be opened in either ANSI or UNICODE format. There is no default conversion.

Programming character strings is the same in WinDev and WinDev Mobile (with the oddexception). WinDev automatically performs the requisite conversion.

S is string

...

or

ANSIstring

Using Text files

ANSIstring

UNICODEstring

fOpen(MyFile,ANSI)

fReadLine(...)

fOpen(MyFile,Unicode)

fReadLine(...)

ANSI

UNICODE

Windows PC

Concepts.book Page 35 Lundi, 29. août 2005 6:40 18

Page 36: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Part

3:

Pro

gra

mm

ing

in

W-L

an

gu

ag

e36

FILE PICKER AND PATHS ON POCKET PCFile pickerIn Pocket PC, the file picker is used to select files which are located in:

• the "\My Documents" directory or one of its immediate subdirectories;• a directory at the root of a storage card.

The fSelect function is used to select a file which is located in one of these directories.

Directory and file pathsDirectories are managed in different ways on a PC and on a Pocket PC.On a PC, paths are like this: "C:\MyDocuments\MyFile.txt". But on a Pocket PC, paths are like this:"\MyDocuments\MyFile.txt". There is not just one treeview and there is no drive path.

The concept of current directory does not exist in Windows for Pocket PC (because of the limitedoperating system). This is why WinDev Mobile does not have functions to handle current directories(e.g. fCurrentDir).

Concepts.book Page 36 Lundi, 29. août 2005 6:40 18

Page 37: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Part

3:

Pro

gra

mm

ing

in

W-L

an

gu

ag

e

37

KEYPAD MANAGEMENT

A keypad (also called SIP – Software Input Panel) enables end-users to enter information on PocketPC. The keypad is used to:

The W-Language functions in WinDev Mobile simplify the use of the keypad (SIPXXX functions). Note: On a Smartphone, the number pad is used to enter data.

•display a miniature keypad in the lower part ofthe screen. The user clicks the keypad with astylus to enter information.

•automatically detect words written on thescreen with the stylus ("Transcriber"method).

•automatically detect letters written in a certaincharset ("Letter recognizer" method):

•automatically detect blocks of wordswritten in a certain charset ("Blockrecognizer" method):

Concepts.book Page 37 Lundi, 29. août 2005 6:40 18

Page 38: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Part

3:

Pro

gra

mm

ing

in

W-L

an

gu

ag

e38

FUNCTIONS SPECIFIC TO POCKET PCKeypad management functionsThese functions facilitate keypad management on Pocket PC:

SIM card management functions These functions facilitate management of information in the personal directory on a SIM card. Theyare only available for "Pocket phones" and Smartphones.

Automatic application run management functionsThese functions are used to manage automatic application run:

SIPList Returns the list of keypad types available for Pocket PC

SIPMode Identifies and/or changes the current keypad

SIPVisible Finds out whether the current keypad is enabled and enables it

SIMWrite Writes or modifies an entry in the SIM card directory

SIMRead Reads an entry in the SIM card directory

SIMNbContact Returns the number of entries in the SIM card directory

SIMDelete Deletes an entry from the SIM card directory

AutoRunAdd Automatically runs a WinDev Mobile application when a specific eventoccurs. This is defined via a WinDev Mobile application.

AutoRunDelete Automatically stops a WinDev Mobile application.

Concepts.book Page 38 Lundi, 29. août 2005 6:40 18

Page 39: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Part

3:

Pro

gra

mm

ing

in

W-L

an

gu

ag

e

39

FUNCTIONS AND PROPERTIES NOT AVAILABLE IN POCKET PCYou are familiar with standard WinDev? Most functions and properties in standard WinDev are available in WinDev Mobile. The following functions and properties are only available in standard WinDev, because most ofthem would be pointless in the Pocket PC environment.

WinDev features not available in WinDev Mobile

1. Window Editor•"Drag and Drop" management.•Web Camera control.•Conference control.•OLE control.•ActiveX control.•HTML control.•Toolbar.•Bar code.•MDI window.

2. Report Editor•Table + Chart, Mailing, Charts•"Memory zone" and "SQL query via ODBC connection" data sources•"Bar code", "RTF", "Chart" controls•Print preview (only available in test mode)•RTF, HTML, PDF, etc. print formats. Only the PCL format is available.

3. Hyper File•Replication.•Log operations.•Transactions.•Hyper File 5 format.•Data files exceeding 2GB.

Concepts.book Page 39 Lundi, 29. août 2005 6:40 18

Page 40: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Part

3:

Pro

gra

mm

ing

in

W-L

an

gu

ag

e40

W-Language functions not available in WinDev Mobile

AgentXXX functions AnsiToOem AppliControl AutomationEvent

AutomationParameter ToolbarDock ToolbarUndock ToolbarPosition

BinaryXXX functions ShowTooltip ceXXX functions StringToPalm

FieldAlias ControlOver ChangeKeyboard ChangeTemplate

LoadProcedure CurrentColumn Compile CreateShortcut

CursorXXX functions dArc dChord DDExxx functions

UnloadProcedure dInvertColor DnDxxx functions dSlice

dResize dFill dRotation dSaveImagePNG

dHorizontalSymmetry dVerticalSymmetry EmailUpdate EmailMsgError

EnumSubElement SendKey ExePriority ExplorerAccept

ExplorerRetrieve LargeFontFactor FaxXXX functions fLock

fShortPath fLongPath fCompress fUnlock

fDecompress fCurrentDrive fDriveInfo fDriveReady

WinChangeAlias WinIconBarHeight HelpFile FileToPalm

StreamXXX functions fShortName fLongName fCopyDir

fMoveDir fCurrentDir fDirectoryExist fSelectDir

fImageSelect fStopCompress fSizeUncompressed gARetrieve

gpwXXX functions grXXX functions HAddGroup HAddUser

Hasp HLockFile HLockRecNum HChangeLogDir

HChangeRplDir HConvertX functions HCopyFile HCreateSubscriberReplica

HCreateMasterReplica HCreateMoveableReplica Functions HDBxxx HUnlockFile

HUnlockRecNum HStartLock HDescribeKey HIsLocked

HRecordToXML HErrorLock HExportXML HEndNoDatabaseAccess

HEndNoModif HEndLock HSetLog HSetReplication

HSetTransaction HImportText HImportXML HInfoLock

HnfoGroupI HInfoReplica HInfoServer HInfoUser

HInitSubscriber HInitHF55 HNoDatabaseAccess HNoModif

HLogXXX functions HListDatabase HListGroup HListUser

HListConnectedUser HMigrateLinkedCompositeKey

HMode HModifyGroup

HModifyUser HOptimize HOptimizeQuery HPost

HRegenerateFile HSynchronizeReplica HtmlNavigate HTransactionXXXfunctions

iPreview iRoundedBorder Minimize iLastFile

iEllipse iEscape iWindowCancel iDocumentCanceled

Concepts.book Page 40 Lundi, 29. août 2005 6:40 18

Page 41: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Part

3:

Pro

gra

mm

ing

in

W-L

an

gu

ag

e

41

W-Language properties not available in WinDev Mobile

1. Window and control management properties

iDocumentPrinted iPrintBarcode iPrintZoneRTF iInfoPrinter

iLink WindowBitmap ITransparentMagenta IconInstall

InternetConnected iParameterPreview iParameterPDF iSelectFont

JavaXXX Functions Maximize MciXXX functions MDIxxx functions

MemXXX functions MenuUnMark MenuState MenuInvisible

MenuLabel MenuIsMarked MenuMark MenuSelectMinus

MenuSelectPlus MessageAddCell MessageDeleteCell NetXXX functions

NumHelp ObjectActive OemToAnsi OLExxx functions

PalmXXX functions Ping FontList FontSelect

NetworkDisconnect NetworkDirName NetworkUser Restore

RTFxxx functions SelectColor sEvent sEndEvent

SocketCreateUDP SQLxxx functions SysShutdown SysSetFocus

SysEnvironment SysMinimize SysReleaseDC SysErrorMode

SysGetDC TableFixColumn TableToExcel TableToWord

TableToXML tapiCallIsBusy tapiStop tapiRecord

tapiCompleteTransfer tapiPlay tapiKeyPressed TextToXML

TwainXXX functions VideoXXX functions WHelp xlsXXX functions

XMLxxx functions zipCreateExe

Address Display TooltipTitle RightClick

MouseCursor Detection DndTarget DndSource

Driver TimeOut Ellipse OutgoingData

Identifier MDIBottom MDIRight MDILeft

MDITop HelpNumber Opacity IncomingData

TriState

Concepts.book Page 41 Lundi, 29. août 2005 6:40 18

Page 42: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Part

3:

Pro

gra

mm

ing

in

W-L

an

gu

ag

e42

2. Report, block and control management properties

3. Hyper File properties

ODBCSQLCode ODBCPassword ODBCDatabaseName ODBCConnectionName

ODBCUserName

CxCursorOptions CxOLEDBProvider CxDescribedOLEDBProvider CxCacheSize

LogFile TransactionFile LogMethod WDD55Password

Name55 LogDirectory ReplicationDirectory Replication

WDD55

Concepts.book Page 42 Lundi, 29. août 2005 6:40 18

Page 43: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Part 4 Communication

Concepts.book Page 43 Lundi, 29. août 2005 6:40 18

Page 44: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Concepts.book Page 44 Lundi, 29. août 2005 6:40 18

Page 45: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Part

4:

Co

mm

un

icati

on

45

COMMUNICATION WITH WINDEV MOBILE

WinDev Mobile can be used for communication between two Pocket PCs, a Pocket PC and aSmartphone, a Pocket PC and a PC, etc.These "dialogs" are operated by infrared, Wi-Fi, GPRS, etc.

SummaryThe table below shows the communication modes available for each WinDev Mobile feature.

Remote access (RPC

on Hyper File)

Email FTP HTTP TelephonySOAPJ2EE.NET

Socket SMS

ActiveSync X X X X X X

Network card X X X X X X

GPRS X X X X X X

Infrared X

Smartphone or phone access (GSM)

X X

Wi-Fi X X X X X X

Concepts.book Page 45 Lundi, 29. août 2005 6:40 18

Page 46: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Part

4:

Co

mm

un

icati

on

46

Examples

1. Communication by InfraredSocket functions (SocketConnectInfrared, SocketCreateInfrared, etc.) are used to communicate byinfrared as follows:•Pocket PC to Pocket PC•Pocket PC with a Smartphone.•Pocket PC with a PC.•Pocket PC with any device equiped with an infrared port (printer, electric gates, etc.).

2. Communication by Wi-FiCommunication by Wi-Fi can be used for FTP file transfer.

Pocket PC 1

Application

contact

Socket creation (SocketCreateInfraRed function)

Pocket PC 2

Application

contact

Connection to socket(SocketConnectInfraRed function)

ContactApplication

ContactApplication

Infraredcommunication

(SocketRead,SocketWrite, ...)

FTP Server Pocket PC

Connection to server(FTPConnect function)

File transferby Wi-Fi

(FTPxxxx functions )

WinDevMobile

applicationFTP account

Anonymous

Concepts.book Page 46 Lundi, 29. août 2005 6:40 18

Page 47: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Part

4:

Co

mm

un

icati

on

47

3. Communication by GPRSCommunication by GPRS can be used to access a remote Hyper File database via the Internet.

InternetIntranet

PC Pocket PC

Connection to Internet(NetOpenRemoteAccess function)

Connection to remote database (HConnectRemoteAccess function)

WinDevMobile

application

Gprs Gprs

Concepts.book Page 47 Lundi, 29. août 2005 6:40 18

Page 48: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Part

4:

Co

mm

un

icati

on

48

EMAIL MANAGEMENT VIA POP3/SMTPPOP3 and SMTP are email management protocols supported by all Internet Service Providers. Youuse them to dialog directly with the email server provided by your ISP.

Notes: •The POP3 protocol is used to receive emails.• The SMTP protocol is used to send emails.

How it works

1. Connect the Pocket PC to a PC (required if the Pocket PC does not have an Ethernet card or GPRS modem). 2. Connect to the ISP (if necessary). 3. Open a messaging session with the EmailOpenSession function. 4. Send and read messages.5. Close the messaging session with the EmailCloseSession function.

Incoming andoutgoing emails

Pocket PC

WinDevMobile

Application

SMTP ProtocolOutgoing emails

POP3 ProtocolIncoming emails

Email server(Host)

Connection : Ethernet card,Wi-fi, Modem GPRS...

Concepts.book Page 48 Lundi, 29. août 2005 6:40 18

Page 49: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Part

4:

Co

mm

un

icati

on

49

EMAIL MANAGEMENT VIA CEMAPICEMAPI is an email management API most Pocket applications use to send and receive emails(usually Pocket Outlook).CEMAPI simplifies email management by the host. When an email has been read, it is automaticallyloaded in the local message box and deleted from the host server.All the characteristics required for email management (POP3 and SMTP protocols, remote access,etc.) are grouped together in the "User Account".A WinDev Mobile application uses W-Language email functions to handle emails managed by anapplication using "CEMAPI".

"ActiveSync" user accountA user account defined in Pocket Outlook is required to manage emails with CEMAPI. By default,Pocket Outlook manages the "ActiveSync" user account.

PC

Email server(Host)

Pocket PC

WinDevMobile

application

Connection: USB,Wi-fi, BlueTooth...

Synchronizationvia ActiveSync

OutlookPocket

ActiveSyncaccount

Outlook

Incoming andoutgoing emails

Connection: Internet

Concepts.book Page 49 Lundi, 29. août 2005 6:40 18

Page 50: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Part

4:

Co

mm

un

icati

on

50

Other user accountTo use another user account, you must describe it.If the Pocket PC does not have a direct Internet link, it must be synchronized with a PC to send andreceive emails.

If the Pocket PC has direct Internet access (by Wi-Fi, etc.), it does not need to be synchronized witha PC.

PCPocket PC

WinDevMobile

Application

Connection: USB,Wi-fi, BlueTooth...

Incoming andoutgoing emails

OutlookPocket

Otheraccounts

Email server(Host)

Incoming andoutgoing emails

Connection: Internet

Concepts.book Page 50 Lundi, 29. août 2005 6:40 18

Page 51: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Part

4:

Co

mm

un

icati

on

51

HANDLING FILES ON AN FTP SERVER

FTP (File Transfer Protocol) is a standard protocol used to transfer files from one site to another. It isused to exchange files via TCP/IP, Internet, Wi-Fi or ActiveSync.There are several thousand file servers which can be accessed by FTP on the Internet. They useshareware or freeware available to the public. WinDev Mobile provides W-Language functions to manage files on an FTP server from your WinDevMobile applications.

File transfer by Wi-Fi via a direct link between a Pocket PC and an FTP server:

File transfer via the Internet:

FTP Server Pocket PC

Connection to server(FTPConnect function)

File transferby Wi-Fi

(FTPxxxx functions )

WinDevMobile

applicationFTP account

Anonymous

Pocket PC

WinDevMobile

application

FTP Server

FTP account

Anonymous

InternetIntranet PC

Connection: USB, Wi-fi, BlueTooth...

FTPGet function

File recovery

Concepts.book Page 51 Lundi, 29. août 2005 6:40 18

Page 52: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Part

4:

Co

mm

un

icati

on

52

SENDING AN SMSWith WinDev Mobile, you can send an SMS (Short Message Service) using the W-Language SMSfunctions.An SMS is a text message (up to 160 characters) sent on a cell phone.

To use SMS functions, the Pocket PC application must be installed: •on a Pocket PC with phone access (GSM),•or on a Smartphone.

Note: WinDev Mobile can only be used for sending an SMS. SMS reception is done in the usual wayon a cell phone, Smartphone, Pocket PC, etc.

Cell phone,Smartphone

PCSoft

Sending the message(SMSSend function)

Receiving the message

Pocket PC

Creating the message(SMS structure)

SMSapplication

Concepts.book Page 52 Lundi, 29. août 2005 6:40 18

Page 53: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Part 5 Interactions WinDev and WinDev Mobile

Concepts.book Page 53 Lundi, 29. août 2005 6:40 18

Page 54: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Concepts.book Page 54 Lundi, 29. août 2005 6:40 18

Page 55: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Part

5:

In

tera

cti

on

s W

inD

ev -

Win

Dev M

ob

ile

55

INTERACTION WITH A STANDARD WINDEV APPLICATION

A standard WinDev application can access a Pocket PC using Pocket PC access functions.

WinDev Mobile is provided with examples of ways to use Pocket PC access functions.•PC Registry.•PC Explorer.These examples can be used on a PC.

Database

Windows PC Pocket PC

WinDev MobileApplication

Connection: USB, Wi-fi, BlueTooth...

WD90CE.DLL

, ,

Run applications

cdbxxx access (Read, write...)

Copy files File

WinDevApplication

Concepts.book Page 55 Lundi, 29. août 2005 6:40 18

Page 56: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Part

5:

In

tera

cti

on

s W

inD

ev -

Win

Dev M

ob

ile

56

POCKET PC: SHARING WINDEV ELEMENTS

You can use the same WinDev elements (analysis, reports, queries, etc.) in a standard WinDevapplication and a WinDev Mobile application:•Windows: standard WinDev and WinDev Mobile windows are not in the same format (different

size, position of menus, etc.). You can import a standard WinDev window to a WinDev Mobileproject. The standard WinDev windows (".WDW" file) are automatically converted to Pocket PCformat (".WPW" file).

•Help: this element does not exist in Pocket PC.•Analysis, reports, queries, classes, sets of procedures, etc.: these elements can be shared

directly by a standard WinDev application and WinDev Mobile application.

WINDEV Project (.wdp)

WINDEV Mobileproject (.wpp)

Windows (.wdw)

Help

Windows (.wpw)

Import

Share Share

Analysis

Classes

Sets ofprocedures

Reports

Concepts.book Page 56 Lundi, 29. août 2005 6:40 18

Page 57: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Part

5:

In

tera

cti

on

s W

inD

ev -

Win

Dev M

ob

ile

57

HANDLING A POCKET PC FROM A STANDARD WINDEV APPLICATION

The following W-Language functions are used to access a Pocket PC via a standard WinDevapplication:

ceConnect Connects the current workstation to a Pocket PC

ceCopyFile Copies a file on the current workstation to a Pocket PC connected to it; onthe Pocket PC to the current workstation; on the Pocket PC to anotherdirectory on the Pocket PC

ceCreateShortcut Creates a shortcut on the Pocket PC connected to the current workstation

ceFileDate Returns or changes file dates (created, modified or accessed)

ceDisconnect Closes the connection between the current workstation and the Pocket PC

cePowerStatus For information on the Pocket PC battery (main or backup)

ceConnectionStatus To find out the status of connection between the current workstation andPocket PC

ceFileExist Tests whether a file exists

ceFileTime Returns or changes file times (created, modified or accessed)

ceRunExe Runs a program (e.g. executable) via the current application

ceListFile Lists the files in a directory (and subdirectories) and returns the number ofthem

ceRegistryNextKey Identifies the key after the one specified in the Pocket PC registry

ceRegistryCreateKey Creates a key in the Pocket PC registry

ceRegistrySetValue Writes a value in a register in the Pocket PC registry

ceRegistryExist Tests whether a Pocket PC registry key exists

ceRegistryListValue Returns the name and, if required, the type of values of a Pocket PCregistry key

ceRegistryQueryValue Reads the value of a register in the Pocket PC registry

ceRegistryFirstSubkey Identifies the key after the one specified in the Pocket PC registry

ceRegistrySubkey Identifies the path of the Nth subkey specified in the Pocket PC registry

ceRegistryDeleteKey Deletes a subkey from the Pocket PC registry

ceRegistryDeleteValue Deletes a value from the Pocket PC registry

Concepts.book Page 57 Lundi, 29. août 2005 6:40 18

Page 58: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Part

5:

In

tera

cti

on

s W

inD

ev -

Win

Dev M

ob

ile

58

Reminder: you can also use cdbXXX functions (listed on page 27).

ceDir Searches for a file or directory on the Pocket PC connected to the currentworkstation

ceMakeDir Creates a directory on the Pocket PC connected to the current workstation

ceRemoveDir Deletes a directory from the Pocket PC connected to the currentworkstation

ceDeleteFile Deletes a file from the Pocket PC connected to the current workstation

ceDeleteShortcut Deletes a shortcut created with the ceCreateShortcut function

ceSysDir Returns the path of a system directory on the Pocket PC connected to thecurrent workstation

ceFileSize Returns the size (in bytes) of a file on the Pocket PC connected to thecurrent workstation

ceProcessorType Returns the type of processor on the Pocket PC connected to the currentworkstation

ceWindowsVersion Returns information on the version of Windows used by the Pocket PCconnected to the current workstation

ceXRes Returns the horizontal resolution of the screen on the Pocket PCconnected to the current workstation

ceYRes Returns the vertical resolution of the screen on the Pocket PC connectedto the current workstation

Concepts.book Page 58 Lundi, 29. août 2005 6:40 18

Page 59: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Part 6 Appendix

Concepts.book Page 59 Lundi, 29. août 2005 6:40 18

Page 60: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Concepts.book Page 60 Lundi, 29. août 2005 6:40 18

Page 61: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Part

6:

Ap

pen

dix

61

TOOLS AVAILABLE IN WINDEV MOBILE

There are specific tools for using a Pocket PC via a PC:

WDExplorerTo view files and directories on a Pocket PC,Smartphone, etc.

WDRegistryTo view the registry on a Pocket PC, Smartphone,etc.

WDCEDBTo access standard databases (.cdb) on a PocketPC, Smartphone, etc.

WDCaptureTo take screen shots of a Pocket PC or Smartphoneconnected to a PC.

WDSynchroTo configure Hyper File Mobile synchronization by ActiveSync.

Concepts.book Page 61 Lundi, 29. août 2005 6:40 18

Page 62: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Part

6:

Ap

pen

dix

62

WINDEV MOBILE COMPONENTS

The examples of the components provided with WinDev Mobile are divided into 2 categories:

•components which can be used via a WinDev Mobile applicationThese components are in the "Components\Pocket" subdirectory of theWinDev Mobile setupdirectory.

•components which can be used via a standard WinDev application handling Pocket PC files These components are in the "Components\Windows" subdirectory of theWinDev Mobile setupdirectory.

There are two specific subdirectories for each of these examples:•"<ComponentName>-Example" contains an example of a project using the component.•"< ComponentName>-Source" contains the project of the component.

Further components can be downloaded from www.windev.com

Component name Description

Login Management Manages user ID in an application based on a user nameand password

Falcon Pocket To access all Falcon Pocket PC functions

Pocket GPS To poll a GPS to retrieve longitude, latitude, speed andaltitude.

Pocket Directory picker Directory picker for Pocket PC

Symbol Pocket To access all Symbol Pocket PC functions

TomTom Pocket TomTom Navigator (satellite-aided navigation software)

Component name Description

PC Directory picker Directory picker on a Pocket PC via a standard WinDevapplication.

PC File Pricker File picker on a Pocket PC via a standard WinDevapplication.

Concepts.book Page 62 Lundi, 29. août 2005 6:40 18

Page 63: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Part

6:

Ap

pen

dix

63

EXAMPLES PROVIDED WITH WINDEV MOBILE

The examples provided with WinDev Mobile are designed to help you learn about WinDev Mobilefeatures.Their source code is given in detail with comments.The examples are in the "Examples" subdirectory of the WinDev Mobile setup directory and can beopened via the Kouglof ("Catalog Wizard" tab, "Examples" button).

Types of examples provided with WinDev Mobile :•examples for Pocket PC only.•examples of a project for Pocket PC interacting with a project for PC.

Below are the features of examples provided with WinDev Mobile.

Examples for Pocket PC only

Pocket Animated This example illustrates the options for animating images with WinDevMobile.

Pocket Biorythm This example is used to view your biorythm based on your date of birth.

Pocket FTPClient This example is used to view the contents of an FTP server. It is also usedto download, rename or delete files.

Pocket Slideshow This example is an image viewer for Pocket PC. It is used to view imagesin a directory.

Pocket Explorer This example is a file explorer for Windows CE. You can list the files anddirectories on a Pocket PC.

Pocket Map This example is a lighter version of the WDMap tool. It is used to view andmodify data files in Hyper File Mobile format directly on a Pocket PC.

Pocket Notes This example is used to draw graphics "notes" and save them. You canenter keywords to find the notes again easily.

Pocket Poker This example is used to play poker on a Pocket PC.The aim of this game is simple: get several identical cards.

Pocket Presence This application is an attendance manager for noting the people whowere present at a seminar.The list of registered people is entered in the database beforehand.

Concepts.book Page 63 Lundi, 29. août 2005 6:40 18

Page 64: Concepts - pcsoft-windev-webdev.compcsoft-windev-webdev.com/usconcepts/windevmobile/Concepts.pdfWinDev Mobile Concepts 4 IN WHAT ORDER SHOULD THE GUIDES BE READ? WinDev Mobile is a

Part

6:

Ap

pen

dix

64

Examples of a project for Pocket PC interacting with a project for PC

Further examples can be downloaded from www.windev.com

Pocket Tic Tac Toe This example is used to play at "Tic Tac Toe" on a Pocket PC.The aim of this game is simple: align 3 counters before your opponentdoes.

Pocket ZIP This example shows how to create and use archives (".ZIP" files).

Sending an SMS•Pocket Sending an SMS project for Pocket PC•PC Sending an SMS project for PC

These examples are used to send an SMS.

Expense account•Pocket ExpenseAccount project for Pocket PC•PC ExpenseAccount project for PC

These examples are used to manageexpense accounts. Data entered can be synchronized in bothprojects.

Poll•Pocket Poll project for Pocket•PC Poll project for PC

These examples are use for running polls.Data entered can be synchronized in bothprojects.

Network tasks•Pocket Network tasks for Pocket PC•PC Network tasks for PC

The PC Network tasks application is used toenter a task list (with priority management,deadlines, automatic reminders, etc.).The Pocket Network tasks application isused to access this task list to specify if atask is in progress or completed.

Sockets•Pocket Sockets for PC•PC Sockets for PC

These examples show how to use socketmanagement functions.

Concepts.book Page 64 Lundi, 29. août 2005 6:40 18