Screen Orientation Library

Discussion in 'Additional Libraries' started by Pachuquin, Feb 7, 2009.

  1. Pachuquin

    Pachuquin Member Licensed User


    First of all, excuse me. I don’t speak english well.

    I’m learning how to write .Net libraries and I have written a simple library to change the screen orientation and to invoke the touchscreen calibration utility.

    GetOrientations: returns the supported orientation modes.

    Modes are as follows:

    0 - 0 degrees
    1 - 90 degrees
    2 - 180 degrees
    4 - 270 degrees

    If returns 0 then no rotation supported.
    If returns 7 then all rotation supported.

    Orientation: set the orientation mode. (See modes above)

    Don’t forget to change the form size after rotate it.

    Calibrate: invokes the touchscreen calibration utility.

    This library only works in the device.
    Please, test it.


    One question. ¿How can I hide DEVMODE struct? Because it isn’t necessary in Bb4ppc.

    Attached Files:

    Last edited: Feb 7, 2009
  2. Cableguy

    Cableguy Expert Licensed User

    Place an undscre before any public props, methods or events...

    public Width

    should become

    public _width

    This will hide the _width prop from basic4ppc...
  3. Pachuquin

    Pachuquin Member Licensed User

    Thanks, Cableguy.

    I have already corrected it
  4. Pachuquin

    Pachuquin Member Licensed User

    Hi Steve:

    You are free to use it.

    Best regards
  5. HARRY

    HARRY Active Member Licensed User

    Sample please

    Can somebody show me some sample code to use this library? I don't see it in the HELP list.

  6. Cableguy

    Cableguy Expert Licensed User

    Load it like you would do any other dll, using the components.., add its object, and the properties and methods should become available...
    Keep in mind tha this is a DEVICE only dll...
  7. Firefox®

    Firefox® Member Licensed User

    Don't work on my HTC Touch HD, .GetOrientations return 0 and .Orientation return always 0 in Portrait and Landscape mode.
    Last edited: Jul 15, 2009
  8. Filippo

    Filippo Expert Licensed User

  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