|
From: Pedro M. Espinosa on 7 Jul 2008 15:23 Hi all: I remember I saw this a long ago, but cannot find it. I want that whenever I open an specific window, if an instance of it is already open, just to give it focus and show it up front. And the same also for my app, i.e. just have one instance running. TIA Pedro
From: kdmurphy on 8 Jul 2008 03:40 Pedro, To stop multiple instances of your App running you need to use a mutex - there ws a reason post on this but I cnnot remeber he title of it. For the windows in your own - assuming you have a Shellwindow as the basis do the following: 1. In the Open method of the Shell call the GetallChildren method . This will rturn an array of child windows. 2. Loop through this array checking for the window you want to see if it is en 3. if yes, use SetFocus method 4. If not open it The child windows then call the open method of the ShellWindow rather than handling it themselves. Hope this helps. Kevin Pedro M. Espinosa wrote: > Hi all: > I remember I saw this a long ago, but cannot find it. > I want that whenever I open an specific window, if an instance of it > is already open, just to give it focus and show it up front. > And the same also for my app, i.e. just have one instance running. > TIA > Pedro
|
Pages: 1 Prev: bBrowser & Vertical scrollbar Next: SQL Statement strings & deliminators |