Well...
I am developing a pure .NET CF application and do not want to write it
being
platform depended...
and using this function fill require that the plantform my application
started on has coredll.dll module and SetForegroundWindow function.
another reason is that when I use the code
Caprure = true
GetCapture
Capture - false
SetForegroundWindow
it helps to activate and show my application window, but the screen still
flicks
(the desktop window or a window of some other active application is shown
before activating of my application window)
I do not know why it always happens, I know there is a BringToFron
function
but it seems does nothing
Peter Foot said:
Why don't you want to use any P/Invoke? You don't need to use the whole
of
the OpenNETCF code just for this function, just define the P/Invokes you
need:-
http://blog.opennetcf.org/pfoot/PermaLink.aspx?guid=a4bca0e4-439b-411a-87cd-0950e9d16b10
[DllImport("coredll")]
private static extern IntPtr GetCapture();
[DllImport("coredll")]
private static extern bool SetForegroundWindow(IntPtr hwnd);
Peter
--
Peter Foot
Windows Embedded MVP
http://www.inthehand.com |
http://blog.opennetcf.org/pfoot/
McFar said:
and sorry I do not want to use any PInvoke calls like in opennetcf
SetForegroundWindow(hwnd)
In my pocket pc application (i write it on .NET CF) i show a dialog using
ShowDialog method, when user closes the dialog box my application become
not
active and to activate it I sould go to Settings->memory->running
programs -> activat
What the matter? If I do something wrong?
Please help me my pocket pc have a lot of such forms and it is not usable
when after any form closed my application become not active...