New to .netcf2 and ppc dev

D

droll

Hi guys. I'm totally new to this platform (previously on UIQ + Symbian). I
have a few burnin questions and I hope this is the right ng to ask them (my
apologies otherwise!)... My first priority is to code using C# on .NETCF v2
(WM5) so any answers in that platform would be greatly appreciated. However,
I am aware there are limitations and I'm willing to explore a C++ dll that I
can call from managed code for other functionality. So here goes:

1. As I understand it, the OS or .netcf can terminate the app when the
system is running low on memory. This is similar to Symbian. However, in
Symbian, I could trap a certain exit message posted into my app and decide
how I want to handle it. One of the ways of handling it is to prevent my app
from terminating (in some scenarios, I want this to happen). Is there a
similar fashion to achieve this?

2. On the Dopod 900 device, you can close the flip screen. Is there a
general mechanism I can setup to watch for messages and see what message
gets posted when this happens? I want my app to do certain things when the
flip is closed.

3. How do I read resource strings from my resource file?? :(

4. How do I forcefully terminate a phone call?

5. Is there an alarm server available in PocketPC that I can use? E.g. I can
post an alarm into the alarm server that says "Expire the alarm at 10:15pm
with the following ring tone. Identify my alarm with a GUID number that only
my app will recognize so that it won't show up in other apps like Calendar,
Clock, Tasks etc."

Code snippets would be helpful. :( I'm still struggling with things (only 1
into this!) but I can surely tell you that the learning curve on this
platform esp on .NETCF v2 is much easier than Symbian's C++.

Thanks.
 
P

Paul G. Tobey [eMVP]

1. WM_CLOSE is what you're looking for, I think.

2. Remote Spy, one of the remote tools, should do this. You can certainly
run it from eMbedded Visual C++ 4.0 with your WM5 SDK installed. Likely,
though, there are no messages sent to the average application when the 'lid'
is closed. You'll probably have to catch power state changes. What do you
want to do when this happens?

5. I don't really understand what you're trying to do. You can run an
application/set an operating system event at a given time with
CeRunAppAtTime (I believe that is declared in OpenNETCF). It's been
discussed here before. You can search the group archives via GoogleGroups:

http://groups.google.com/group/micr...tframework?hl=en&lr=lang_en&ie=UTF-8&oe=UTF-8

Events set in this way don't do anything with respect to Calendar on PPC.
As far as server this or whatever, that would be up to you.

Paul T.
 
D

droll

ok i think i'm starting to grasp this. i have a problem with multiple forms
on my app. so i read some stuff around and people recommended creating a
class that handles the form switching. a couple of questions here:

1. is Form.Close() the same as deleting the instance of the form? if not,
then how is it different from Form.Hide() ?? only in respect to events being
fired off?
2. i have created a class like so:

public class Class1
{
public static Form2 myForm2 = new Form2();
public static Form1 myForm1 = new Form1();
}

and i call Application.Run(Class1.myForm1);

in Form1, i have a menu click event where i do:

Class1.myForm2.Show();
Class1.myForm1.Hide();

and in form2, when i have another menu click event where i do:

Class1.myForm1.Show();
Class1.myForm2.Hide();

is this correct?? coz i'm seeing strange behaviour as follows:
a. in Form1, i click on the meu to open Form2.
b. Form2 doesn't appear. i still see Form1.
c. i repeat #a again and this time i see Form2.

am i doing this all wrong? :(
 

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

Similar Threads

NETCF2 WIN CE.NET 4.20 5
Win32 File Version in a NETCF v2 App 1
Smartphone Dev 1
Palm and PPC dev? 8
OS Version 2
Devices with Symbian and J2ME 2
Integrating Vs2005 and Netcf2 1
CrossFire 1

Top