form lose its focus..

T

tony

Hi.

my application lose its focus when im not using it (pressing keys..)
*for several hours*.

when i come back to the device after several hours,
and press some key, THEN its lose the focus .
(AGAIN : it's lose the focus WHEN im pressing the key).


here is log :
------------------------------------------------------------

22x08x2006 12:00>>Application.Run(m_frmBase)
22x08x2006 03:15>>========================
22x08x2006 03:15>>=======MAIN MENU========
22x08x2006 03:15>>========================
22x08x2006 11:00>>frmMainMenu::tmrMinutes_Tick::this.Focused=False
22x08x2006 11:01>>frmMainMenu::tmrMinutes_Tick::this.Focused=False
22x08x2006 11:02>>frmMainMenu::tmrMinutes_Tick::this.Focused=False
22x08x2006 11:03>>frmMainMenu::tmrMinutes_Tick::this.Focused=False

-------------------------------------------------------------

one important thing i want to mention is :
im using application.run(frmBase)
but then i add panel from diffrenet form and give the focus the new form.

somthing like this :
======================
Application.run(frmBase);
new frmMain
frmBase.controls += frmMain.panel
frmMain.focus.
=====================
the keydown is in the frmMain.
but after several hours, and when pressing the key,
the frmMain lost the focus.
(its only happen if im not using the app for several hours).

maybe the OS return the focus to the first form ,when the process is "wake
up" ?
any ideas/direction what can cause this behavior ?
 
T

Thomas Hall

If you are "waking the device up" from a low power state, you will need
to restore focus to your application's top level window. The OS
provides the notification, but you will need to respond to it.
OpenNETCF's Smart Device Framework (SDF) exposes an easy to use
PowerManagement.PowerUp Event you can use to do this.

Regards,
Thomas
 

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