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

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

Code Samples & Tips Share your recent discoveries and ideas with other users.

Read notebook battery status

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-27-2009, 08:21 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,726
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default Read notebook battery status

The following code reads the status of a notebook battery:
Code:
Sub Globals
    
'Declare the global variables here.

End Sub

Sub App_Start
    obj.New1(
False)
    obj.CreateNew(
"System.Windows.Forms.SystemInformation" & obj.System_Windows_Forms)
    obj.Value = obj.GetProperty(
"PowerStatus")

    
Msgbox(FindPowerLineStatus, FindBatteryLifePercent)
End Sub

Sub FindBatteryLifePercent
    
Return obj.GetProperty("BatteryLifePercent")
End Sub
Sub FindPowerLineStatus
    
Return obj.GetProperty("PowerLineStatus"'returns Offline or Online
End Sub
Attached Files
File Type: sbp desktop-battery.sbp (761 Bytes, 59 views)
Reply With Quote
  #2 (permalink)  
Old 10-28-2009, 12:02 PM
Byak@'s Avatar
Basic4ppc Veteran
 
Join Date: Jul 2008
Posts: 416
Send a message via ICQ to Byak@
Awards Showcase
Beta Tester 
Total Awards: 1
Default

or you can use a dzHW.dll
but may be you know how read a cpu usage and ram usage???
__________________
I'll Kill you, I'll Crash you, I'll never be yours!
--------------------------------------------------
Qtek s110; o2 XDA Flame; Nokia E63 red;
ASUS Eee PC 901 (Windows XP sp3) + TouchScreen;
Reply With Quote
  #3 (permalink)  
Old 10-28-2009, 01:05 PM
Byak@'s Avatar
Basic4ppc Veteran
 
Join Date: Jul 2008
Posts: 416
Send a message via ICQ to Byak@
Awards Showcase
Beta Tester 
Total Awards: 1
Default

what i'm found for c#
How to get CPU usage of processes and threads / System / C# Официальный сайт справочников World C++, World C#, ASM World
__________________
I'll Kill you, I'll Crash you, I'll never be yours!
--------------------------------------------------
Qtek s110; o2 XDA Flame; Nokia E63 red;
ASUS Eee PC 901 (Windows XP sp3) + TouchScreen;
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
GPS.Status alfcen Questions (Windows Mobile) 6 11-10-2007 12:42 AM
Battery Status with Language Selection. FAFILI Share Your Creations 0 10-15-2007 10:47 AM
Battery Status, New Version. FAFILI Share Your Creations 0 10-15-2007 09:30 AM
Battery Saver project Cableguy Questions (Windows Mobile) 1 07-12-2007 07:02 PM
Charge of the battery JJM Questions (Windows Mobile) 2 06-03-2007 09:28 AM


All times are GMT. The time now is 10:34 PM.


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