Screen orientation error on desktop with fgControl

Bassaidai

Member
Licensed User
Longtime User
hi,

this is my first post here on the forum so I'd like to say hi to everybody first! :)

I've already found very valuable informations here, great deal, thanks a lot!

Right now I'm trying to get a grip on game development on PPC, fullscreen, for 800x480 devices.

First tests are ok, I'm using formlib for fullscreen and fgControl for switching to landscape mode:
B4X:
   screen.New1
   screen.ChangeOrientation(screen.Landscape)
   
   flb.New1("Form1", B4PObject(1))
   flb.FullScreen2("true", "true")

On the device (Samsung Omnia II) this works nice, running onthe desktop I get following error:

error.gif


I couldn't find any information on Google or here at the forum.

The standard basic4ppc demos all run and compile well, so it seems the .NET environment is correctly setup... ?!?

System is: WinXP64 SP2

Thanks a bunch for any help!
Joerg
 

sitajony

Active Member
Licensed User
Hi, the response is easy, the function ChangeOrientation on fgControl need some module who is on Device only and it's not the same thing on Desktop, isn't there a Desktop version for fgControl?

On your screenshot it return that "WindowsCE.Forms" is not found. Normal if you're not on a device...

You should use a library Desktop version or an other library for Desktop sorry...
I hope it's useful... Good luck ;)
 

Bassaidai

Member
Licensed User
Longtime User
hi sitajony,

thanks for your reply. I do use fgControlsDesktop.dll for desktop and fgControlsDevice.dll for device.

Makes it kinda hard to develope, cause I have to comment/uncomment all orientation commands prior to testrunning on PC... :/

Is there a way to check weather the application is running on desktop or device during runtime?

Thanks
Joerg
 

sitajony

Active Member
Licensed User
I don't unserstand all your message but When you compile for Device only the Device Library are emerged/used and the same thing for Desktop, when you run your source code directly on B4P it take the desktop library...
You've to compile for Device and Desktop and not use the Device compiled on Desktop cause only the device library are used...
You can also check if it's running on PPC or not with the cPPC constant:
If cPPC Then
Msgbox("It's running on PPC")
Else
Msgbox("It's running on Desktop")
End If
 

Bassaidai

Member
Licensed User
Longtime User
Thanks Sitajony!

I will simply check with the cPPC-condition, if the application is running within the basic4ppc debug-process (which brings up the error and stops the application - thats why I said its kind of hard to develope that way :) ) or on the device.

Kind regards
Joerg
 
Top