For Programmers: Free Programming Magazines  


Home > Archive > Smartphone Developer Forum > January 2006 > Form focus problem









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Form focus problem
AIK

2006-01-16, 8:01 am

Hello.

Im making a smartphone program for Windows Mobile 5.0 using C#. In this
program there is a form. I open other forms on it as a dialog:
using(MyForm form = new MyForm())
{
form.ShowDialog();
}

Here is my problem: when i have opened a dialog on the main form, and press
end button(red phone), program losts its focus as it should. But when i give
the focus back to my program by pressing its icon, program acts veird:

When i close the dialog with this.Close(), mainform losts its focus again!
So i have to press the icon again to get the program visible.

Here's the situation once again:
mainForm opened -> dialog opened -> program losts focus -> program gets
focus -> dialog closed -> program losts focus again!

How can i fix this? Is there easy way?
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com