Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Preventing Menu Popup in IE ActiveX
Message
 
À
04/05/2017 09:42:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01650836
Message ID:
01650843
Vues:
73
>Hi
>
>I want to display a local html file in an IE ActiveX control contained on a form. Is there a way to prevent the user from accessing the right-click menu of the IE ActiveX control in order to prevent the user from accessing the hard-disk via that route (i want to run this under terminal services mode)?


You'd have to define and assign an event handler for yourIEinstance.Document, in which you would override the HTMLDocumentEvents_oncontextmenu method
Something like below
*
oDocEvHandler = CREATEOBJECT("HTMLDocumentEvents")
EVENTHANDLER(yourIEinstance.Document, m.oDocEvHandler)


*=====================================================
DEFINE CLASS HTMLDocumentEvents AS Custom
	IMPLEMENTS HTMLDocumentEvents IN "MSHTML.TLB"
*=======================================================

	... All other methods of the interface 


	PROCEDURE HTMLDocumentEvents_oncontextmenu() AS LOGICAL
		*-S-*[ Suppress the context menu
		RETURN .F.
	ENDPROC

ENDDEFINE
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform