For Programmers: Free Programming Magazines  


Home > Archive > Smartphone Developer Forum > March 2006 > FindWindow/SetForegroundWindow









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 FindWindow/SetForegroundWindow
Tim Wallace

2006-03-29, 7:06 pm

I'm writing an app for Smartphone (WM2003) in C#. I am trying to write it
so that only one instance will run at a given time. I have added code that
checks for a mutex. If found, it attempts to do a FindWindow and
SetForegroundWindow to bring the application to the front. It is not
working. Is their something different about FindWindow and/or
SetForegroundWindow on Smartphone? Does anyone have an example that works
for them?

Tim


Alex Feinman [MVP]

2006-03-29, 7:06 pm

Form-based CF applications have this feature included. In fact you have to
jump through the hoops to make it behave otherwise. See here
http://blog.opennetcf.org/afeinman/...BE-0323B7F54B11


"Tim Wallace" <twallace-ThisDoesNotBelong-AT-emailDOTcom> wrote in message
news:OqjaD3zUGHA.4276@TK2MSFTNGP10.phx.gbl...
> I'm writing an app for Smartphone (WM2003) in C#. I am trying to write it
> so that only one instance will run at a given time. I have added code
> that checks for a mutex. If found, it attempts to do a FindWindow and
> SetForegroundWindow to bring the application to the front. It is not
> working. Is their something different about FindWindow and/or
> SetForegroundWindow on Smartphone? Does anyone have an example that works
> for them?
>
> Tim
>


Tim Wallace

2006-03-30, 7:06 pm

Well, I have an application that opens a from from the main() function, and
if I press the home key on my phone and then click the icon to launch the
app again, it does not bring it to the front. I have a motorola MPx220 with
WM2003.

Any ideas?

Tim

"Alex Feinman [MVP]" <public_news@alexfeinman.com> wrote in message
news:eoedb74UGHA.1236@TK2MSFTNGP11.phx.gbl...
> Form-based CF applications have this feature included. In fact you have to
> jump through the hoops to make it behave otherwise. See here
> http://blog.opennetcf.org/afeinman/...BE-0323B7F54B11
>
>
> "Tim Wallace" <twallace-ThisDoesNotBelong-AT-emailDOTcom> wrote in message
> news:OqjaD3zUGHA.4276@TK2MSFTNGP10.phx.gbl...
>



Sponsored Links







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

Copyright 2008 codecomments.com