ActiveX window runs minimized

ActiveX window runs minimized

Postby cdmmaui » Wed Sep 26, 2007 5:32 pm

I am having a problem with the following code. When the window is activated it displays for a brief second then goes to the task bar (minimized); I then need to click the task bar item for the window to reappear. What can I do so the window does not run minimized? I have tried the following with no luck.

ACTIVATE WINDOW oWnd2 ON INIT BringWindowToTop( oWnd2:hWnd )
ACTIVATE WINDOW oWnd2 ON INIT ShowWindow( oWnd2, 1)
ACTIVATE WINDOW oWnd2 ON INIT ShowWindow( oWnd2, 5 )
ACTIVATE WINDOW oWnd2 ON INIT ShowWindow( oWnd2, 9)
ACTIVATE WINDOW oWnd2 NORMAL

// Source below...
MENU oMenu
MENUITEM "&Close" ACTION ( oWnd2:End() )
ENDMENU

DEFINE WINDOW oWnd2 FROM 0, 0 TO 40, 85 MENU oMenu

oActiveX = TActiveX():New( oWnd2, "Shell.Explorer" )
oWnd2:oClient = oActiveX
oActiveX:Do( "Navigate2", cAesdd + cHan )

ACTIVATE WINDOW oWnd2 NORMAL

Thank you,
*~*~*~*~*~*~*~*~*~*
Darrell Ortiz
CDM Software Solutions, Inc.
https://www.cdmsoft.com
User avatar
cdmmaui
 
Posts: 689
Joined: Fri Oct 28, 2005 9:53 am
Location: Houston ∙ Chicago ∙ Los Angeles ∙ Miami ∙ London ∙ Hong Kong

Postby James Bott » Thu Sep 27, 2007 6:12 pm

Darrell,

I don't know if either of these will work, but you can try:

SetForeGroundWindow( hWnd )

Or,

SetActiveWindow( hWnd )

You might also try a sysRefresh() afterward.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby cdmmaui » Thu Sep 27, 2007 6:37 pm

Hi James,

Thank you, I will try to use these two with ON INIT
*~*~*~*~*~*~*~*~*~*
Darrell Ortiz
CDM Software Solutions, Inc.
https://www.cdmsoft.com
User avatar
cdmmaui
 
Posts: 689
Joined: Fri Oct 28, 2005 9:53 am
Location: Houston ∙ Chicago ∙ Los Angeles ∙ Miami ∙ London ∙ Hong Kong

Postby Antonio Linares » Thu Sep 27, 2007 8:27 pm

Darrell,

You may also try:

ACTIVATE WINDOW oWnd2 NORMAL ;
ON INIT SetFocus( oWnd2:hWnd )
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42079
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby cdmmaui » Thu Sep 27, 2007 8:37 pm

Thank you James and Antonio; I tried all three with and without sysrefresh() and it did not work. Any chance it has something to do wiht IE7?
*~*~*~*~*~*~*~*~*~*
Darrell Ortiz
CDM Software Solutions, Inc.
https://www.cdmsoft.com
User avatar
cdmmaui
 
Posts: 689
Joined: Fri Oct 28, 2005 9:53 am
Location: Houston ∙ Chicago ∙ Los Angeles ∙ Miami ∙ London ∙ Hong Kong

Postby Antonio Linares » Thu Sep 27, 2007 8:40 pm

Darrell,

Could you provide a small and self contained sample to test it here ? thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42079
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby James Bott » Thu Sep 27, 2007 10:46 pm

Darrell,

This works for fine here (and it is visible):

Code: Select all  Expand view
// Test ActiveX

#include "fivewin.ch"

function main()
   local oWnd,oActiveX

   DEFINE WINDOW oWnd

   oActiveX = TActiveX():New( oWnd, "Shell.Explorer" )
   oWnd:oClient = oActiveX
   oActiveX:Do( "Navigate2", "www.microsoft.com" )

   ACTIVATE WINDOW oWnd

return nil
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 75 guests