Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

COM Server prevents application window from coming to front!

Status
Not open for further replies.

jonscott8

Programmer
May 12, 2000
1,317
0
0
US
Here's what's happening:

I instantiate a COM object from an Out-of-Process COM Server in the start-up(main .prg) of my application while SCREEN=OFF.

Immediately before issuing READ EVENTS, I set _Screen.Visible = .T..

My application becomes visible(to the taskbar); however, remains behind any previously visible windows. Basically, it doesnt receive keyboard focus.

If I remove the COM object instantiation, my application window comes to the front as it should.

I've tried the following API functions to force my window to the front:

BringWindowToTop - No luck
SetForegroundWindow - Makes the window flash (blink)
ShowWindow - No luck

Any suggestions or SWAGs?? Jon Hawkins
jonscott8@yahoo.com

The World Is Headed For Mutiny,
When All We Want Is Unity. - Creed
 
Jon,
There is an example on the UT that supposedly works, you could also try SetActiveWindow(), look it up in the API.
Good Luck
John Herring
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top