Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
How to change display settings: screen resolution, screen refresh rate
Adding and deleting Scheduled Tasks using NetScheduleJob API functions
Custom GDI+ class
Capturing keyboard activity of another application with the Raw Input API (VFP9)
Converting Unicode data from the Clipboard to a character string using a given code page
Enumerating data formats currently available on the clipboard
Establishing connection using the SQLDriverConnect
Winsock: sending email messages (SMTP, port 25)
Splash Screen for the VFP application
Detecting changes in connections to removable drives (VFP9)
Custom FTP Class for Visual FoxPro application
GDI+: copying to the Clipboard (a) image of active FoxPro window/form, (b) image file
How to create non-blocking Winsock server
How to print a bitmap file
Enumerating raw input devices attached to the system (keyboard, mouse, human interface device)
Using WM_COPYDATA for interprocess communication (VFP9)
Bitmap Class for Visual FoxPro application
Custom HttpRequest class (WinINet)
Custom HttpRequest class (WinHTTP)
How to activate Windows Calculator
Sending email messages with Simple MAPI
Displaying bitmap using the AlphaBlend function
Peer-to-peer LAN messenger built with Mailslot API functions
How to create MD-5 and SHA-1 hash values from a string
Pocket PC: creating new database in the Object Store and copying Contacts Database records into it

User rating: 0/10 (0 votes)
Rate this code sample:
  • ~
More code examples    Listed functions    Add comment     W32 Constants      Translate this page Printer friendly version of this code sample
Before you begin:
Start ActiveSync and establish connection with your Pocket PC before the testing.

The code is based on base RAPI Database class and on custom RAPI Database class for operating with the Object Store Databases. Download both class modules prior to testing this code.
 
SET PROCEDURE TO clsRapi ADDITIVE
SET PROCEDURE TO clsRapiDb ADDITIVE
 
PRIVATE oRapi As TrapiDb
oRapi = CREATEOBJECT("TrapiDb")
 
IF NOT oRapi.Connected
    = MESSAGEBOX("Mobile device is unavailable.     ", 48, "Error")
    RETURN
ENDIF
 
LOCAL cDbname, dbsrc As RapiDatabase, dbdst As RapiDatabase,;
    nIndex, oProp As RecProperty, nRecordOid
 
cDbname="dbContactsCopy"
 
WITH oRapi.databases
    * re-creates empty database
    .DeleteDatabase(m.cDbname)
    .CreateDatabase(m.cDbname)
 
    dbsrc = .GetDatabase("Contacts Database")
    dbdst = .GetDatabase(m.cDbname)
ENDWITH
 
IF NOT dbsrc.OpenDatabase()
    = MESSAGEBOX("Error code:" +;
        TRANSFORM(dbsrc.errorcode) + ".     " + CHR(13) +;
        "Could not open source database.     ", 48, "Error")
    RETURN
ENDIF
IF NOT dbdst.OpenDatabase()
    = MESSAGEBOX("Error code:" +;
        TRANSFORM(dbsrc.errorcode) + ".     " + CHR(13) +;
        "Could not open target database.     ", 48, "Error")
    RETURN
ENDIF
 
* copying each property of each record in the source database
* to the target database
FOR nIndex=0 TO dbsrc.dbreccount-1
    dbsrc.goto(nIndex)
 
    * initial zero value of the record oid
    * causes the system to create new record
    nRecordOid=0
    FOR EACH oProp IN dbsrc.props
        = dbdst.WriteProp(@nRecordOid, oProp)
    NEXT
NEXT
dbsrc.CloseDatabase
dbdst.CloseDatabase
 
 
 

User rating: 0/10 (0 votes)
Rate this code sample:
  • ~
1334 bytes  
Created: 2004-08-23 13:32:00  
Modified: 2009-02-15 19:32:38  
Visits in 7 days: 63  
Listed functions:
Printer friendly API declarations
My comment:


#kwd: sln_pocketpc.
Word Index links for this example:
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
User Contributed Notes:
There are no notes on this subject.


Copyright © 2001-2013 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.1.55-log), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.224.75.101)
4 sec.Function: 'ToAscii'
Function group: 'Keyboard Input'
3.06 hrs.Function: 'FtpGetFileSize'
 Function: 'FlashWindowEx'
Function group: 'Error Handling'
3.8 hrs.Function: 'GlobalReAlloc'
Function group: 'Memory Management'
 Example: 'Retrieving top-child window for the VFP form'
8.86 hrs.Example: 'Retrieving the name of the default printer for the current user on the local computer (Win NT/XP)'
11.77 hrs.Solution: 'LanguageBar ActiveX Control'
15.44 hrs.Example: 'Creating a mailslot'
 Function: 'ImageList_Destroy'
Function group: 'Windows Controls'
18.44 hrs.
Function group: 'Network Management'
Google
Advertise here!