FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour ActiveX window runs minimized
Posts: 708
Joined: Fri Oct 28, 2005 09:53 AM
ActiveX window runs minimized
Posted: Wed Sep 26, 2007 05: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
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
ActiveX window runs minimized
Posted: Thu Sep 27, 2007 06: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

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 708
Joined: Fri Oct 28, 2005 09:53 AM
ActiveX window runs minimized
Posted: Thu Sep 27, 2007 06: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
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
ActiveX window runs minimized
Posted: Thu Sep 27, 2007 08:27 PM

Darrell,

You may also try:

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

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 708
Joined: Fri Oct 28, 2005 09:53 AM
ActiveX window runs minimized
Posted: Thu Sep 27, 2007 08: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
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
ActiveX window runs minimized
Posted: Thu Sep 27, 2007 08:40 PM

Darrell,

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

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
ActiveX window runs minimized
Posted: Thu Sep 27, 2007 10:46 PM
Darrell,

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

// 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
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10

Continue the discussion