Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

Screen off

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-08-2009, 09:08 PM
Knows the basics
 
Join Date: Jan 2009
Posts: 50
Awards Showcase
Beta Tester 
Total Awards: 1
Default Screen off

Anyone know how to call screen off or "sleep" on the ppc?
Reply With Quote
  #2 (permalink)  
Old 05-09-2009, 12:54 AM
Knows the basics
 
Join Date: May 2008
Posts: 53
Default

Hi joel2009

Here you are a simple library to suspend your ppc.

Simply, call "Suspend" method.

Best Regards
Attached Files
File Type: zip pachPower.zip (2.2 KB, 94 views)
Reply With Quote
  #3 (permalink)  
Old 05-09-2009, 09:12 AM
Ida Ida is offline
Knows the basics
 
Join Date: Mar 2009
Posts: 83
Default

Hello Pachuquin,

[quote=Pachuquin;24671]Hi joel2009

Here you are a simple library to suspend your ppc.

Simply, call "Suspend" method.

Best Regards[/QUOTE

Can you please show a little sample in Basic4PPC?
How can I implement your "pachPower" in a Basic4PPC-program?

I am a beginning programmer, so I don't know.


Ida
Reply With Quote
  #4 (permalink)  
Old 05-09-2009, 11:08 AM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 2,344
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

Go to "Tools" -> "Components".
Then locate the .dll file and add it, note that this is a device only dll...
After this go to "Tools" -> " Add Object"
An object called "pachPower" show be shown...
select it and insert a name to use it in b4p enviroment..

In your code you will first have to initialize the dll component..

Imagine that you nemed the object as "Power"...
Typing "Power." will sho the available method for the dll, and a "new" method should be present...
This is the initialization method..

"Power.new"

Then, anywere on your code, inside the same module, you can call any other method from the dll...

the available methods are:

SoftReset() Will soft reset the device
PowerOn() Will turn the device ON
PowerOff() Will turn the device OFF
PowerSuspend() Will put the device in Suspend mode


Hope this helps
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)

My Posts helped you? Consider Buying me a Porto Glass!
Reply With Quote
  #5 (permalink)  
Old 05-09-2009, 07:54 PM
Knows the basics
 
Join Date: Jan 2009
Posts: 50
Awards Showcase
Beta Tester 
Total Awards: 1
Default

thanks Pach
Reply With Quote
  #6 (permalink)  
Old 05-12-2009, 02:43 PM
Ida Ida is offline
Knows the basics
 
Join Date: Mar 2009
Posts: 83
Default

@Paulo:
thank you for your help!

Quote:
Originally Posted by Cableguy View Post
Go to "Tools" -> "Components".
Then locate the .dll file and add it, note that this is a device only dll...
I do this -ok.

[/quote]
After this go to "Tools" -> " Add Object"
An object called "pachPower" show be shown...
[/quote]

"Add Object" is grey and I cannot select it.

[/quote]
select it and insert a name to use it in b4p enviroment..

In your code you will first have to initialize the dll component..

Imagine that you nemed the object as "Power"...
Typing "Power." will sho the available method for the dll, and a "new" method should be present...
This is the initialization method..

"Power.new"

Then, anywere on your code, inside the same module, you can call any other method from the dll...

the available methods are:

SoftReset() Will soft reset the device
PowerOn() Will turn the device ON
PowerOff() Will turn the device OFF
PowerSuspend() Will put the device in Suspend mode


Hope this helps[/quote]

The other points I cannot do so.

What's wrong at my program?

Please excuse my questions!

Ida
__________________
HTC Touch 3G
Reply With Quote
  #7 (permalink)  
Old 05-12-2009, 04:11 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Quote:
Originally Posted by Ida;24722[/QUOTE
"Add Object" is grey and I cannot select it.
Even though the dll only works on the device it will need adding to the desktop as well in order for the IDE to be able to see the objects inside it. This is the reason that, for example, the Hardware and Outlook libraries have desktop dummy equivalents that (mainly) do nothing but do have the same objects and methods so that the IDE and the optimising compiler know about them.
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
  #8 (permalink)  
Old 05-12-2009, 05:02 PM
Ida Ida is offline
Knows the basics
 
Join Date: Mar 2009
Posts: 83
Smile

@Agraham

Quote:
Originally Posted by agraham View Post
"Add Object" is grey and I cannot select it.

Even though the dll only works on the device it will need adding to the desktop as well in order for the IDE to be able to see the objects inside it. This is the reason that, for example, the Hardware and Outlook libraries have desktop dummy equivalents that (mainly) do nothing but do have the same objects and methods so that the IDE and the optimising compiler know about them.[/quote]


thank you very much for your help!
I have explore many hours. but nothing helps, but after I take pachpower also to Desktop ( like you write), now "Add Object" is not grey and I can take it.
Thank you very much. I was so irritated.

Ida
__________________
HTC Touch 3G

Last edited by Ida : 05-12-2009 at 05:04 PM.
Reply With Quote
  #9 (permalink)  
Old 05-13-2009, 03:21 PM
Ida Ida is offline
Knows the basics
 
Join Date: Mar 2009
Posts: 83
Default

@Pachuquin:
Thank you for your nice dll!
What's the difference between PowerSuspend and PowerOff?

@Paulo and @Andrew:

Thank you for your helping! Now I have make a little sample.
It's all ok?

Ida
Attached Files
File Type: sbp Power.sbp (1.2 KB, 34 views)
__________________
HTC Touch 3G
Reply With Quote
  #10 (permalink)  
Old 05-14-2009, 05:33 PM
Ida Ida is offline
Knows the basics
 
Join Date: Mar 2009
Posts: 83
Default

Nobody can help me?
__________________
HTC Touch 3G
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Screen size in the IDE agraham Beta Versions 0 05-07-2009 09:24 AM
Screen resolutions Cor Questions (Windows Mobile) 2 11-22-2008 05:02 PM
PDA screen blanker aerohost Questions (Windows Mobile) 1 06-18-2008 05:44 PM
Different screen sizes Gex Questions (Windows Mobile) 4 01-23-2008 10:46 AM
Is there a way to keep the screen in the same location. XerVision Questions (Windows Mobile) 11 08-03-2007 12:46 AM


All times are GMT. The time now is 04:19 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0