1. Win32Lib: code request
Hi all,
Does anybody have some code that will check if an instance of your program
is already running, and if so, give the focus to that instance? I haven't
really looked into it yet, I'm just hoping that somebody's already done the
work to accomplish this. If not, I'll be sure to share my solution.
thanx,
Brian
2. Re: Win32Lib: code request
On Thu, 30 Mar 2000 01:45:11 -0500, Brian Broker <bkb at CNW.COM> wrote:
>Hi all,
>
>Does anybody have some code that will check if an instance of your program
>is already running, and if so, give the focus to that instance? I haven't
>really looked into it yet, I'm just hoping that somebody's already done the
>work to accomplish this. If not, I'll be sure to share my solution.
>
Brian:
Use EnumWindows that uses a callback EnumWindowsProc and cycle through
the top-levels windows using the EnumWindowsProc to check each window's
title until it finds your window. Once you find it then you can set
the focus.
Bernie