Mega Code Archive

 
Categories / Delphi / LAN Web TCP
 

Disable the Popupmenu in TWebbrowser

Title: disable the Popupmenu in TWebbrowser? // Put a TApplicationEvents component on your form and assign a OnMessage event handler: procedure TfrmMyBrowser.ApplicationEvents1Message(var Msg: tagMSG; var Handled: Boolean); begin if (Msg.Message = WM_RBUTTONDOWN) or (Msg.Message = WM_RBUTTONDBLCLK) then begin if IsChild(Webbrowser1.Handle, Msg.hwnd) then begin // Show your own Popupor or whatever you want here Handled := True; end; end; end;