Screen Orientation Library

Pachuquin

Member
Licensed User
Longtime User
Hi

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.

Thanks

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

Attachments

  • pachScreen.zip
    3.2 KB · Views: 155
Last edited:

Cableguy

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

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

example:
public Width

should become

public _width

This will hide the _width prop from basic4ppc...
 

HARRY

Active Member
Licensed User
Longtime User
Sample please

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

Greetings,
Harry
 

Cableguy

Expert
Licensed User
Longtime 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...
 

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:
Top