Detecting if a full-screen application is already running 
Author Message
 Detecting if a full-screen application is already running

Hello

Ive made a program which shows a popup form, without borders and
animates through irregular window shapes tricks. I want this form to
be on top of all the other applications that the user is running, so I
set it as topmost window. Now this form pops up when user brings mouse
on the top right corner of the screen. It s a particular location
where if mouse is brought, the form pops up and does some animation.

My issue is that if the user is already running a full screen
application, like 3D games or viewing movies, this form still pops up
if mouse enters the designated area of the screen.

I'm trying to write a code to detect if any full-screen application is
already running, so as to avoid the popup from interfering with that
application's interface.

I need advise on that. Does anyone have any suggestion?

Regards
Faraz Azhar



Tue, 14 Feb 2012 13:25:47 GMT  
 Detecting if a full-screen application is already running

released on Thu, 27 Aug 2009 22:25:47 -0700 (PDT) bearing
the following fruit:

Quote:
>Hello

>Ive made a program which shows a popup form, without borders and
>animates through irregular window shapes tricks. I want this form to
>be on top of all the other applications that the user is running, so I
>set it as topmost window. Now this form pops up when user brings mouse
>on the top right corner of the screen. It s a particular location
>where if mouse is brought, the form pops up and does some animation.

>My issue is that if the user is already running a full screen
>application, like 3D games or viewing movies, this form still pops up
>if mouse enters the designated area of the screen.

>I'm trying to write a code to detect if any full-screen application is
>already running, so as to avoid the popup from interfering with that
>application's interface.

>I need advise on that. Does anyone have any suggestion?

>Regards
>Faraz Azhar

You need to show the door both tea, and no tea.

--
Jan Hyde



Tue, 14 Feb 2012 16:12:44 GMT  
 Detecting if a full-screen application is already running

Quote:

> released on Thu, 27 Aug 2009 22:25:47 -0700 (PDT) bearing
> the following fruit:

> >Hello

> >Ive made a program which shows a popup form, without borders and
> >animates through irregular window shapes tricks. I want this form to
> >be on top of all the other applications that the user is running, so I
> >set it as topmost window. Now this form pops up when user brings mouse
> >on the top right corner of the screen. It s a particular location
> >where if mouse is brought, the form pops up and does some animation.

> >My issue is that if the user is already running a full screen
> >application, like 3D games or viewing movies, this form still pops up
> >if mouse enters the designated area of the screen.

> >I'm trying to write a code to detect if any full-screen application is
> >already running, so as to avoid the popup from interfering with that
> >application's interface.

> >I need advise on that. Does anyone have any suggestion?

> >Regards
> >Faraz Azhar

> You need to show the door both tea, and no tea.

> --
> Jan Hyde

say what?


Tue, 14 Feb 2012 17:55:23 GMT  
 Detecting if a full-screen application is already running

Quote:

> released on Thu, 27 Aug 2009 22:25:47 -0700 (PDT) bearing
> the following fruit:

> >Hello

> >Ive made a program which shows a popup form, without borders and
> >animates through irregular window shapes tricks. I want this form to
> >be on top of all the other applications that the user is running, so I
> >set it as topmost window. Now this form pops up when user brings mouse
> >on the top right corner of the screen. It s a particular location
> >where if mouse is brought, the form pops up and does some animation.

> >My issue is that if the user is already running a full screen
> >application, like 3D games or viewing movies, this form still pops up
> >if mouse enters the designated area of the screen.

> >I'm trying to write a code to detect if any full-screen application is
> >already running, so as to avoid the popup from interfering with that
> >application's interface.

> >I need advise on that. Does anyone have any suggestion?

> >Regards
> >Faraz Azhar

> You need to show the door both tea, and no tea.

> --
> Jan Hyde

say what?


Tue, 14 Feb 2012 17:56:24 GMT  
 Detecting if a full-screen application is already running
Faraz Azhar escribi:

Quote:
> Hello

> Ive made a program which shows a popup form, without borders and
> animates through irregular window shapes tricks. I want this form to
> be on top of all the other applications that the user is running, so I
> set it as topmost window. Now this form pops up when user brings mouse
> on the top right corner of the screen. It s a particular location
> where if mouse is brought, the form pops up and does some animation.

> My issue is that if the user is already running a full screen
> application, like 3D games or viewing movies, this form still pops up
> if mouse enters the designated area of the screen.

> I'm trying to write a code to detect if any full-screen application is
> already running, so as to avoid the popup from interfering with that
> application's interface.

> I need advise on that. Does anyone have any suggestion?

> Regards
> Faraz Azhar

My first thought was to get the foreground window with
GetForeGroundWindow, but then I realized that a program may be running
with a full screen window but another window still can be on top of it
(in the same monitor or another one).
So I propose to use the API WindowFromPoint to get what window is
showing in the place you are about to show your animation.

Once you have the handle (hwnd), you can use GetWindowRect to get the
window's dimension and position.
Then you could use GetDesktopWindow to get the handle of the desktop
window, and also with GetWindowRect compare its dimension and position
with the ones of the other window.

May be there is a easier way but that's my idea right now.

But... if you want your code to be ready for multiple monitors
environments, you'll have to see in what monitor your app will show and
the desktop window size and position for this particular monitor. Check
the APIs MonitorFromPoint, EnumDisplayMonitors. You can't use
GetDesktopWindow then.

You have the APIs information and same samples here:
http://allapi.mentalis.org/apilist/apilist.php



Tue, 14 Feb 2012 18:04:34 GMT  
 Detecting if a full-screen application is already running

Quote:
> Faraz Azhar escribi:

> > Hello

> > Ive made a program which shows a popup form, without borders and
> > animates through irregular window shapes tricks. I want this form to
> > be on top of all the other applications that the user is running, so I
> > set it as topmost window. Now this form pops up when user brings mouse
> > on the top right corner of the screen. It s a particular location
> > where if mouse is brought, the form pops up and does some animation.

> > My issue is that if the user is already running a full screen
> > application, like 3D games or viewing movies, this form still pops up
> > if mouse enters the designated area of the screen.

> > I'm trying to write a code to detect if any full-screen application is
> > already running, so as to avoid the popup from interfering with that
> > application's interface.

> > I need advise on that. Does anyone have any suggestion?

> > Regards
> > Faraz Azhar

> My first thought was to get the foreground window with
> GetForeGroundWindow, but then I realized that a program may be running
> with a full screen window but another window still can be on top of it
> (in the same monitor or another one).
> So I propose to use the API WindowFromPoint to get what window is
> showing in the place you are about to show your animation.

> Once you have the handle (hwnd), you can use GetWindowRect to get the
> window's dimension and position.
> Then you could use GetDesktopWindow to get the handle of the desktop
> window, and also with GetWindowRect compare its dimension and position
> with the ones of the other window.

> May be there is a easier way but that's my idea right now.

> But... if you want your code to be ready for multiple monitors
> environments, you'll have to see in what monitor your app will show and
> the desktop window size and position for this particular monitor. Check
> the APIs MonitorFromPoint, EnumDisplayMonitors. You can't use
> GetDesktopWindow then.

> You have the APIs information and same samples here:http://allapi.mentalis.org/apilist/apilist.php

Hmmm.. thats gonna be a tricky code. But yea that seems to be the only
solution currently. I'll try it out and see if it works.
No i'm not coding for multiple monitors.

Thanks Ed.



Tue, 14 Feb 2012 20:15:28 GMT  
 Detecting if a full-screen application is already running

2 minutes googling for "vb detect fullscreen windowed" found the solution in
the 4th link.



Tue, 14 Feb 2012 20:34:08 GMT  
 Detecting if a full-screen application is already running

Quote:
>2 minutes googling for "vb detect fullscreen windowed" found the solution
>in the 4th link.

Removing "windowed" above gives the solution in the first link.


Tue, 14 Feb 2012 20:36:04 GMT  
 Detecting if a full-screen application is already running

Quote:


> >2 minutes googling for "vb detect fullscreen windowed" found the solution
> >in the 4th link.

> Removing "windowed" above gives the solution in the first link.

oh. Thanks! I tried searching but i searched only on vb group, not
google itself. Thanks again!


Thu, 16 Feb 2012 05:30:35 GMT  
 
 [ 9 post ] 

 Relevant Pages 

1. Detecting an active, full-screen DOS box in Win95 from a running VB5 app

2. Detecting if application is already running

3. How to detect my application already running

4. detecting if your application is running already

5. Making my application run full screen

6. Capture Screen in DirectX full screen application

7. Detecting an active, full-screen DOS box in Win95 from a VB5 app

8. How can I detect if MSWord is already running

9. Two parter: Detect app already running, then pass command args to original program

10. Detecting if a program is already running

11. Detecting already running instance of a programme

12. Detecting if Excel is already running

 

 
Powered by phpBB® Forum Software