Device or Desktop

Discussion in 'Questions (Windows Mobile)' started by DaveW, Nov 7, 2008.

  1. DaveW

    DaveW Active Member Licensed User

    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


    in my program but this has to be


    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
    do that

    is there something similar in Basic4PPC?
  2. Mr_Gee

    Mr_Gee Active Member Licensed User

    try the "cPPC = true" constant :
    If cPPC = true Then
    ' running on the PPC
    'running on the Desktop
    End If
  3. agraham

    agraham Expert Licensed User

    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.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice