disable right click menu on gui

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Mipha
Posts: 77
Joined: 27 Jul 2018, 17:08

disable right click menu on gui

25 Nov 2018, 18:05

Code: Select all

gui, add, edit, h0 w0
gui, font, s10
gui +Border +lastfound

mainmenuhighH := A_screenheight / 3
mainmenuhighW := A_screenwidth / 3
Gui, Add, ActiveX, x0 y0 w%mainmenuhighW% h%mainmenuhighH% vfeaturedoc, HtmlFile

gui, show
return
Here is a simple gui. Pressing right click on this brings up this menu Image

Right now. I'm working on another script and almost every option on this menu would break that script. Is there some way to hide the menu or to prevent it from showing up without disabling the right mouse button?
CyL0N
Posts: 211
Joined: 27 Sep 2018, 09:58

Re: disable right click menu on gui

26 Nov 2018, 13:09

tmplinshi's solution below is far superior to that i offered,hence...
Last edited by CyL0N on 27 Nov 2018, 06:21, edited 1 time in total.
live ? long & prosper : regards
tmplinshi
Posts: 1604
Joined: 01 Oct 2013, 14:57

Re: disable right click menu on gui

27 Nov 2018, 05:44

Code: Select all

gui, add, edit, h0 w0
gui, font, s10
gui +Border +lastfound

mainmenuhighH := A_screenheight / 3
mainmenuhighW := A_screenwidth / 3
Gui, Add, ActiveX, x0 y0 w%mainmenuhighW% h%mainmenuhighH% vfeaturedoc, HtmlFile
featuredoc.parentWindow.execScript("document.oncontextmenu = document.body.oncontextmenu = function() {return false;}")

gui, show
return

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Google [Bot], Hugh Jars, Mateusz53, MrDoge, peter_ahk and 383 guests