Application's form collection

  • Thread starter Thread starter nazneen84
  • Start date Start date
N

nazneen84

Hi,

On a certain event, I need my application to behave in a certain way
if it is in the foreground (any of its windows) and differently if it
is isn't.

the target platform is Windows Mobile 5.0 Smartphone SDK.

hence i can't get my application's form collection using openforms and
compare the foreground window's handle. (In order to check if the
application is in the foreground)

how do I get my application's form collection for this target
platform?
Is there another way of checking if the running application is in the
foreground?

Thanks & Regards
Nazneen
 
how do I get my application's form collection for this target
platform?

You have to manage the form collection yourself since OpenForms is not
supported under the .NET Compact Framework.
Is there another way of checking if the running application is in the
foreground?

P/Invoke GetForegroundWindow and compare the resulting HWND (IntPtr) to
the Handle of your app's current form.
 
P/Invoke GetForegroundWindow and compare the resulting HWND (IntPtr)
to
the Handle of your app's current form.

My application's current form is variable. How do I get the form in my
application highest in z-order?
 
P/Invoke GetForegroundWindow and compare the resulting HWND (IntPtr)
to
the Handle of your app's current form.

My application's current form is variable. How do I get the form in my
application highest in z-order?

Why not just expose a CurrentForm property from the form collection
manager that you wil need to create?
 
Why not just expose a CurrentForm property from the form collection
manager that you wil need to create?


Hi
excuse my intrusion in this post. How can i expose a CurrentForm
property ?
I use windows CE embedded 6.0 R2 and i develop in VB.NET 2005. My
device is an x86. I write:

Dim Frms As New Collection
Frms.Add(Namespace.frmNavBar, "1")
Frms.Add(Namespace.frmMainMenu, "2")
......
......
but then ?!??

Thanks
Ale
 
How can i expose a CurrentForm
property ?
I use windows CE embedded 6.0 R2 and i develop in VB.NET 2005. My
device is an x86. I write:

Dim Frms As New Collection
Frms.Add(Namespace.frmNavBar, "1")
Frms.Add(Namespace.frmMainMenu, "2")

You need to derive a class from Collection and then add the property yourself.
 
Back
Top