How can I put an activeX ona dialog with NO BORDER and with NO SCROLLBAR?
The dialog looks like this now:

while I'd like to have it look like this:

Thanks!
Patrick


Patrick,
Are you creating the dialogbox from source code or from resources ?
Antonio Linares wrote:Are you creating the dialogbox from source code or from resources ?From code with @ x, ACTIVEX...
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 ...
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
Patrick,
Please try this:
oActiveX:nDlgCode = DLGC_WANTALLKEYS
Antonio Linares wrote:Please try this:
oActiveX:nDlgCode = DLGC_WANTALLKEYS
Patrick,
Please provide us your test.prg and tested url, if possible. Thanks
Or is it a HTML file on disk ?
Antonio Linares wrote:Please provide us your test.prg and tested url, if possible.Same sample as before:
#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" )
RETURNPatrick,
Please try it with a dialogbox instead of a window.
Antonio Linares wrote:Please try it with a dialogbox instead of a window.Still not ok. Please try this sample:
#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

Antonio Linares wrote:You are missing a ":" here:
oActiveX:nDlgCode := DLGC_WANTALLKEYS
#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 + CRLFAntonio 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: