Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Koen Piller
  Where is Koen Piller?
 Santpoort-Zuid
 Netherlands
 Koen Piller
 To: Pete Sass
  Where is Pete Sass?
 Marathon, Ontario
 Canada
 Pete Sass
 Tags
Subject: RE: VFP Window To Front of Any Application
Thread ID: 394021 Message ID: 394025 # Views: 84 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Forms
Date: Saturday, December 28, 2013 6:59:57 PM         
   


> Hi Foxitains,
>
> This has probably been asked before, but I wanted to pass this off to you all.
>
> Here is what I have.
>
> A top-level-form that by default can only be non-model. This form loads up and is the starting off main
> form for my application that does some QuickBooks integration routines.
>
> So if QuickBooks is running and especially running full screen my application comes up under the
> QuickBooks application and cannot be seem.
>
> If I set my main VFP form to AlwaysOnTop = .T. my issue is resolved, however read on.
> From my main form I am calling a couple of other forms also as top-level-forms. Now these
> come up under my main form and I want them on top of my main form and setting them AlwaysOnTop = .T.
> does not always seem to work.
>
> So to get my secondary top-level-forms to appear above my main top-level-form my main form had
> to be set as AlwaysOnBottom = .T.
>
> I added the below code into the Activate event of my main top-level form:
>
DECLARE BringWindowToTop IN WIN32API as TopWindow long 
> TopWindow(Thisform.HWnd)

> and yes this pushes my main form to the front and bumps it up on top of the already running
> QuickBooks main application screen.
>
> Not sure if anyone else ever ran into my unique combination of forms, but the API does
> it's work for me.
>
> Pete "the IceMan", from the Great White North of Canada.
> www.marathongriffincomputers.com


Hi,
I am puzzled, you have a mainform which you run as top-level form so assume you have set ShowWindow = 2
Now you have activated an API call to ensure your window will be remain visible.
But why do you instantiate other forms also with ShowWindow = 2 ?? For me this is not done, I always have only one form with ShowWindow = 2, other forms I would like users to be ensured to see I set ShowWindow = 1, is that not what you are supposed to do?

Regards,

Koen

ENTIRE THREAD

VFP Window To Front of Any Application Posted by Pete Sass @ 12/28/2013 5:56:59 PM
RE: VFP Window To Front of Any Application Posted by Koen Piller @ 12/28/2013 6:59:57 PM
RE: VFP Window To Front of Any Application Posted by Pete Sass @ 12/28/2013 9:50:17 PM
RE: VFP Window To Front of Any Application Posted by Koen Piller @ 12/29/2013 12:48:31 PM
RE: VFP Window To Front of Any Application Posted by Pete Sass @ 12/29/2013 3:04:11 PM
RE: VFP Window To Front of Any Application Posted by Tore Bleken @ 12/29/2013 11:56:51 PM
RE: VFP Window To Front of Any Application Posted by Jun Tangunan @ 12/30/2013 12:47:49 AM
RE: VFP Window To Front of Any Application Posted by Pete Sass @ 12/30/2013 1:02:00 AM
RE: VFP Window To Front of Any Application Posted by Koen Piller @ 12/30/2013 8:00:20 AM
RE: VFP Window To Front of Any Application Posted by Tore Bleken @ 12/30/2013 9:11:19 AM