Portrait-landscape-accelerometer on HTC Phone.

Discussion in 'Questions (Windows Mobile)' started by dan kabestan, Jan 7, 2009.

  1. dan kabestan

    dan kabestan Member Licensed User

    As the users know, in the (old!) HTC P3300 we had a command to switch Portrait/landscape.
    With the new "accelerometer" generation HTC decides to take it off this command and (i suppose)
    replace it by the accelerometer reactions.
    But HTC doesnt give the correct use context and only the web browser run in the 2 positions.
    On the WWW we find Gsensor or others free softwares witch solve this. But its not realy good.
    Only some softwares switch right : WM microsoft office, files explorer... Starting portrait they switch
    full size in landscape.
    In others applications and B4ppc .exe the form is not refreshed when we switch (moving it).
    We keep a part of screen from portrait moving in landscape position and reverse.
    The only way to have a good run is to pass first by the file explorer, turn in landscape and
    selecting B4ppc .exe, then its running fine full screen.
    Its seem not a B4ppc QVGA option problem, it appears also with others softwares.

    ?? Is there any hidden microsoft flag or something to add in B4ppc to kill this portrait/landscape problem ??
    Maybe a special refresh function ...

    I follow and try all works on the mysterious dll in the forum (and Web) which gives acces to the accelerometer.
    For Information, on HTC Touch Pro, you could find the UP DOWN RIGHT LEFT... move positions information
    in the register-Key :
    HKEY_LOCAL_MACHINE\Software\HTC\HTCSensor\GSensor key "EventChanged"
    See attached file which read it, enjoy.
     

    Attached Files:

  2. Erel

    Erel Administrator Staff Member Licensed User

    I'm not sure if it is related, but in order for a form to correctly switch orientations you should add a FormLib object that wraps this form.
    You just need to add this line somewhere at the beginning of the program:
    Code:
    [FONT=Courier New]flb.New1("Form1",[/FONT][FONT=Courier New][COLOR=#0000ff]B4PObject[/COLOR][/FONT][FONT=Courier New](1))
    [/
    FONT]

    flb is a FormLib object.
     
  3. Filippo

    Filippo Expert Licensed User

  4. dan kabestan

    dan kabestan Member Licensed User

    HTCsensor, the way is yet far...

    Yes thanks Erel , formlib gives a better refresh !

    '-----------------------------------------
    Yes thanks Filippo, Italy-stopwatch is a VERY interesting use of HTCSensor and more (vscroll).
    Is there any doc-help of your dll ? could we access to sensors values (light, stylet and ANGLES) ?
    I have see a 'copyright' , could we use it ?

    '-----------------------------------------
    Actually i obtain :
    - with the Filippo HTCSensor.dll --> the positions 'and' switch portrait/landscape
    - with the HTCSensorS.dll --> the values of all sensors but 'dont switch' portrait/landscape without
    any Gsen Gsensor freeware dll (? is it true ?) Is there any workaround ?
    And then impossible to merge the two dll, because of same object names...
    And no forgetting the HTC dll one, The Gsen, The Gsensor ....
    I know all brains works in front of the HTC crazzy-undocumented....

    Waiting for the federal complete-well-documented B4ppchtcsensor.dll ;-) Have a nice year.
     
  5. Filippo

    Filippo Expert Licensed User

    Hi dan kabestan,

    I'm sorry. I have no documentation.:sign0013:
    It's only a test from me, and not everything does work with Basic4ppc.:(


    Ciao,
    Filippo
     
Loading...
  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