power status for compact framework (CF) 2.0

M

moltilimits

Hi everyone, I found this article to check the control status pocke
pc's batteries: http://msdn2.microsoft.com/en-us/library/aa457088.aspx
but it is for compact framework 1.0.
When I try it in VS 2005 (after wizard conversion) it does not run
because I have only CF 2.0 installed and not CF 1.0.
I tried to create a new project for CF 2.0, import the form, etc. but
the application does not run because of some errors.
I don't know more what to do!
Can someone help me to solve this problem? Eventually is there a new
method to use for CF 2.0? There is a class for power status, with
battery life propoerties but it si not included in the compact version
of the framework :-(
Thank in advance to everyone for the answers.
HELP MEEEEEEE, PLEASE!!!
Bye

moltilimits
 
G

Guest

You don't say what the "problems" are, but the source should work fine in CF
1.0 or CF 2.0. WM 5.0 has some power APIs, but those work only on WM 5.0
devices.
 
P

Paul G. Tobey [eMVP]

"does not run"? "does not run because of some errors", like what? There's
absolutely nothing there that should care about the version of .NET CF,
should generate any errors, or have any problems at all. Either you're
doing something that completely wrong (and something that I can't come up
with at all), or you've got a minor error that's easy to fix (but not
without knowing what it is).

Paul T.
 
M

moltilimits

If I try to compile the original download version of the application
I've got the following error message:
The project with .NET CF 1.0 destination require version 1.1 of .NET
Framework, tha is not present in this computer
I think this is why the original project is fot the version 1.0 of the
framework.

If I create a new project for CF 2.0 and copy the sourde code in the
new project I've got a queue of errors like this:
1) Protected Sub Dispose(disposing As Boolean)' has more definition
with different signatures
2) Private Sub InitializeComponent()' has more definition with
different signatures
3) mainMenu1" is declarated as "Private Dim mainMenu1 As
System.Windows.Forms.MainMenu" in this class
4) Impossible to applicate more time AssemblyTitleAttribute (this in
many lines!)

Someone has some ideas?
Thanks,

Luca
 
M

moltilimits

pratham ha scritto:
I have tried doing this...it works absolutely same way as on CF1.

But you have only the CF 2.0 installed? Don't appare the error
"Error 1 the project with .NET CF 1.0 Framework require 1.1 version of
the .NET Frameworkthat is not present in this computer"?
Bye,
Luca
 
G

Guest

Well install the .NET Framework 1.1 on your development PC if it's asking
for it.

You probably can't copy Forms over as the resx formats are not compatible -
but then the Form has nothing to do with getting the power status - just use
that part of the code.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top