ActiveX NO BORDER

ActiveX NO BORDER

Postby Patrick Mast » Thu Sep 11, 2008 8:14 am

Hi,

How can I put an activeX ona dialog with NO BORDER and with NO SCROLLBAR?
The dialog looks like this now:
Image
while I'd like to have it look like this:
Image

Thanks!

Patrick
User avatar
Patrick Mast
 
Posts: 246
Joined: Sat Mar 03, 2007 8:42 pm

Postby Antonio Linares » Thu Sep 11, 2008 4:32 pm

Patrick,

Are you creating the dialogbox from source code or from resources ?
regards, saludos

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

Postby Patrick Mast » Thu Sep 11, 2008 4:35 pm

Antonio Linares wrote:Are you creating the dialogbox from source code or from resources ?
From code with @ x, ACTIVEX...

Patrick
User avatar
Patrick Mast
 
Posts: 246
Joined: Sat Mar 03, 2007 8:42 pm

Postby Antonio Linares » Thu Sep 11, 2008 4:39 pm

Patrick,

It seems as the Shell.Explorer ActiveX itself is setting those styles.

In the Class TActiveX we only use these styles:

::nStyle = nOR( WS_CHILD, WS_VISIBLE )

You could try to modify them dinamically calling to:

SetWindowLong( oActiveX:hWnd, GWL_STYLE, nXor( GetWindowLong( oActiveX:hWnd, GWL_STYLE ), nOr( WS_BORDER, WS_VSCROLL ) ) ) from the ACTIVATE DIALOG oDlg ON INIT ...
regards, saludos

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

Postby Patrick Mast » Thu Sep 11, 2008 4:41 pm

Antonio,

Also, If I press TAB when the cursor is in a field in the activeX, the TAB does not work in the activeX. Tab seems to go to the next field of the WINDOW, instead of the next label/get in the activex.

Patrick
User avatar
Patrick Mast
 
Posts: 246
Joined: Sat Mar 03, 2007 8:42 pm

Postby Antonio Linares » Thu Sep 11, 2008 4:43 pm

Patrick,

Please try this:

oActiveX:nDlgCode = DLGC_WANTALLKEYS
regards, saludos

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

Postby Patrick Mast » Thu Sep 11, 2008 4:55 pm

Antonio Linares wrote:Please try this:
oActiveX:nDlgCode = DLGC_WANTALLKEYS

Sorry, that did not work.

Patrick
User avatar
Patrick Mast
 
Posts: 246
Joined: Sat Mar 03, 2007 8:42 pm

Postby Antonio Linares » Thu Sep 11, 2008 7:17 pm

Patrick,

Please provide us your test.prg and tested url, if possible. Thanks

Or is it a HTML file on disk ?
regards, saludos

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

Postby Patrick Mast » Thu Sep 11, 2008 8:16 pm

Antonio,

Antonio Linares wrote:Please provide us your test.prg and tested url, if possible.
Same sample as before:
Code: Select all  Expand view
#include "FiveWin.ch"

PROCEDURE Main()

   LOCAL oWnd, oActiveX

   DEFINE WINDOW oWnd

   @ 50, 10 ACTIVEX oActiveX OF oWnd ;
            SIZE 380, 170;
            PROGID "Shell.Explorer"         
           
   oActiveX:nDlgCode = DLGC_WANTALLKEYS         

   @ 1,2 BUTTON "Fire 'Send' button" OF oWnd;
         SIZE 150,20;
         ACTION oActiveX:GetProp("Document"):Forms[0]:Submit()

   ACTIVATE WINDOW oWnd;
     ON INIT oActiveX:Do("Navigate", "http://www.winfakt.be/form_test_1.htm" )

RETURN


So, 2 problems:
1. Border and scrollbar in ActiveX
2. Tab does not go from field1 to fields2 or in the sample from field1 to submit button. Tab is handled by the WINDOW instead of the ACTIVEX.

I also tried to put the "oActiveX:nDlgCode = DLGC_WANTALLKEYS" in the ON INIT of the window, but still no luck.

Thanks!

Patrick
User avatar
Patrick Mast
 
Posts: 246
Joined: Sat Mar 03, 2007 8:42 pm

Postby Antonio Linares » Thu Sep 11, 2008 9:36 pm

Patrick,

Please try it with a dialogbox instead of a window.
regards, saludos

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

Postby Patrick Mast » Fri Sep 12, 2008 7:16 am

Antonio Linares wrote:Please try it with a dialogbox instead of a window.
Still not ok. Please try this sample:
Code: Select all  Expand view
#include "FiveWin.ch"

PROCEDURE Main()

   LOCAL oDlg, oActiveX

   DEFINE DIALOG oDlg FROM 0,0 TO 20,70

   @ 5,5 ACTIVEX oActiveX OF oDlg ;
         SIZE 265, 110;
         PROGID "Shell.Explorer"         
           
   oActiveX:nDlgCode = DLGC_WANTALLKEYS
   
   @ 7,35 BUTTON "Next" OF oDlg;
          SIZE 50,12;
          ACTION oActiveX:GetProp("Document"):Forms[0]:Submit()

   @ 7,25 BUTTON "Previous" OF oDlg;
          SIZE 50,12;
          ACTION oActiveX:Do("GoBack")
         
   ACTIVATE DIALOG oDlg CENTER;
     ON INIT (oActiveX:Do("Navigate", "http://www.winfakt.be/wf/test.asp" ),;
              oActiveX:nDlgCode = DLGC_WANTALLKEYS)

RETURN

If you run this, the dialog looks like this:
Image
If you now press TAB, it looks like this:
Image
While I expected to have input field 2 to become active.

So, 2 problems here;

1. Pressing TAB still try's to go from control to control ON the DIALOG, instead of going from field to field in the BROWSER object.

2. The Browser object gets repainted and it gets hidden except for the active input field.

Patrick
User avatar
Patrick Mast
 
Posts: 246
Joined: Sat Mar 03, 2007 8:42 pm

Postby Antonio Linares » Fri Sep 12, 2008 9:00 am

Patrick,

You are missing a ":" here:

oActiveX:nDlgCode := DLGC_WANTALLKEYS
regards, saludos

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

Postby Patrick Mast » Fri Sep 12, 2008 9:08 am

Antonio Linares wrote:You are missing a ":" here:
oActiveX:nDlgCode := DLGC_WANTALLKEYS

Same result with :=

I think you need to build the app and see for yourself Antonio. ;-)

Patrick
User avatar
Patrick Mast
 
Posts: 246
Joined: Sat Mar 03, 2007 8:42 pm

Postby Antonio Linares » Fri Sep 12, 2008 12:12 pm

Patrick,

We are doing all kind of tests but no luck up to now. It seems as the ActiveX traps all the events. Please notice that bLostFocus is not executed:
Code: Select all  Expand view
#include "FiveWin.ch"

PROCEDURE Main()

   LOCAL oDlg, oActiveX, cEvents := ""

   DEFINE DIALOG oDlg FROM 0,0 TO 20,70

   @ 5,5 ACTIVEX oActiveX OF oDlg ;
         SIZE 265, 110;
         PROGID "Shell.Explorer"         
           
   oActiveX:bOnEvent = { | event, aParams, pParams | cEvents += EventInfo( event, aParams, pParams, oActiveX ) }
   oActiveX:bLostFocus = { || Msgbeep() }
   
   @ 7,35 BUTTON "Next" OF oDlg;
          SIZE 50,12;
          ACTION oActiveX:GetProp("Document"):Forms[0]:Submit()

   @ 7,25 BUTTON "Previous" OF oDlg;
          SIZE 50,12;
          ACTION oActiveX:Do("GoBack")
         
   ACTIVATE DIALOG oDlg CENTER;
     ON INIT (oActiveX:Do("Navigate", "http://www.winfakt.be/wf/test.asp" ),;
              oActiveX:nDlgCode := DLGC_WANTALLKEYS )

   MemoEdit( cEvents )

RETURN

function EventInfo( event, aParams, pParams, oActiveX )

   local cMsg := "Event: " + cValToChar( event ) + CRLF
   local n
   
   cMsg += "Params: " + CRLF
   
   for n = 1 to Len( aParams )
      cMsg += cValToChar( aParams[ n ] ) + CRLF
   next
   
   if event == "BeforeNavigate2"
      // MsgInfo( aParams[ 2 ] )
      // SetEventParam( pParams, 7, .t. ) // Comment this to allow navigation
   endif   

return cMsg + CRLF
regards, saludos

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

Postby Patrick Mast » Fri Sep 12, 2008 12:16 pm

Antonio Linares wrote:We are doing all kind of tests but no luck up to now. It seems as the ActiveX traps all the events. Please notice that bLostFocus is not executed:

Yes, I also noticed. Strange things happen.

Thanks for looking at it.

Patrick
User avatar
Patrick Mast
 
Posts: 246
Joined: Sat Mar 03, 2007 8:42 pm

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 65 guests