Re: Question about WebBrowser
- From: "RDub" <rweinerattrcrentdotcom>
- Date: Tue, 4 Dec 2007 16:29:06 -0500
I also was not able to get the code you posted to disable the context menu
in a Flash ActiveX hosted by a (OpenNETCF 1.4) web browser control. I
wanted to stop the Flash Settings menu from appearing. If you hit the
"Advanced" button in that dialog the OS will throw up a balloon that could
allow the user to break out of my Kiosk mode type application.
What I finally wound up doing was to add a timer to the form that fired
every couple seconds. In the timer tick event I enumerate all of the
running processes looking for the one that opened the balloon. When it
finds the process (remnet.exe), it simply Kills it. Kind'a brutal way to
deal with this, but it seems to be working OK.
If anyone is able to get the Context Menu from displaying in the first pace,
I'd love to know how you made it happen. Please post back here.
Ron W
"Adam" <spamcut@xxxxx> wrote in message
news:57ft5rn74ysw$.oxac79c8sjmy$.dlg@xxxxxxxxxxxxx
Dnia Mon, 5 Nov 2007 15:01:16 +0100, Peter Foot [MVP] napisa³(a):
You need to send a DTM_ENABLECONTEXTMENU message to the control handle
(WM_USER + 110). Set the LPARAM to 0 to disable, 1 to enable.
I have a problem with this.
I simply put a WebBrowser and button component on a form and add this code
to Button onClick event:
IntPtr handle = webbrowser1.Handle;
const int WM_CLOSE = 0x10;
const int WM_USER = 0x0400;
const int DTM_ENABLECONTEXTMENU = WM_USER + 110;
1.//Message msg = Message.Create(handle, DTM_ENABLECONTEXTMENU,
IntPtr.Zero, (IntPtr) 0);
1.//MessageWindow.SendMessage(ref msg);
2.SendMessage(handle, DTM_ENABLECONTEXTMENU, 0, 0);
and
[DllImport("coredll.dll")]
public static extern int SendMessage(IntPtr hWnd, uint Msg, int wParam,
int
lParam);
If I use 1 (Message etc..) with WM_CLOSE, webbrowser1 dissapear.
If I use 2 (with native SendMessage) with WM_CLOSE, webbrowser1 dissapear.
If I use 1 or 2 with DTM_ENABLECONTEXTMENU nothing change and webbrowser
still have a context menu.
What am I doing wrong and what is the correct way of doing it?
.
- Prev by Date: Re: There is no application associated with NETCFSetupv2
- Next by Date: Re: Hi, Any work around for windows mobile 6 dynamic loading warning message ?
- Previous by thread: FileStream bug?
- Next by thread: Microsoft.WindowsMobile.Telephony
- Index(es):