Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Preventing Menu Popup in IE ActiveX
Message
 
To
04/05/2017 09:42:57
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01650836
Message ID:
01650843
Views:
74
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform