Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

Device or Desktop

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-07-2008, 08:24 AM
Knows the basics
 
Join Date: Jun 2008
Location: Barneveld, NL
Posts: 78
Default Device or Desktop

Is there a simple way to determine if the program is running on a Device or Desktop - one which will allow the compiler to use/omit code?

For example, I have

img1clk.New1(img1obj.value,"MouseClick")

in my program but this has to be

img1clk.New1(img1obj.value,"MouseDown")

on the Device. I don't want to have to edit this (and remember what to edit) every time I transfer the program to the device or back again.

In Delphi they have
{$IFDEF VER130}
do this
{$ELSE}
do that
{$ENDIF}

is there something similar in Basic4PPC?
Reply With Quote
  #2 (permalink)  
Old 11-07-2008, 08:27 AM
Basic4ppc Veteran
 
Join Date: Feb 2008
Location: Hilversum, The Netherlands
Posts: 295
Awards Showcase
Beta Tester 
Total Awards: 1
Default

try the "cPPC = true" constant :
If cPPC = true Then
' running on the PPC
Else
'running on the Desktop
End If
Reply With Quote
  #3 (permalink)  
Old 11-07-2008, 12:04 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Quote:
Originally Posted by DaveW View Post
img1clk.New1(img1obj.value,"MouseDown")
This will work on the desktop as well. In general what works on a device will work on the desktop but not vice versa. The Compact Framework on the device is a higly compatible subset of the full Framework. This is why a lot of code, libraries and even compiled exes, intended for the device will actually run on the desktop.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Web browser for desktop and device agraham Additional Libraries 73 03-11-2012 03:44 PM
Using rapi from desktop to copy file from device to desktop sunnyboyj Questions (Windows Mobile) 19 10-27-2010 01:08 PM
Editable Table - Device & Desktop Erel Code Samples & Tips 27 01-15-2010 10:42 PM
Different behaviour DeskTop and Device HARRY Questions (Windows Mobile) 2 02-22-2008 12:36 PM
Different behavior in desktop vs. device on AddEvent willisgt Bug Reports 4 01-13-2008 12:29 PM


All times are GMT. The time now is 03:09 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0