From code with @ x, ACTIVEX...Antonio Linares wrote:Are you creating the dialogbox from source code or from resources ?
Antonio Linares wrote:Please try this:
oActiveX:nDlgCode = DLGC_WANTALLKEYS
Same sample as before:Antonio Linares wrote:Please provide us your test.prg and tested url, if possible.
#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
Still not ok. Please try this sample:Antonio Linares wrote:Please try it with a dialogbox instead of a window.
#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 + CRLF
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:
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 40 guests