Keltset Posted April 20, 2011 Share Posted April 20, 2011 I tried seeking assistance without posting a new thread to no avail, I'm trying to find a way to disable the title bar menu that pops up when you click the top left corner (program icon) in the title bar. This is the menu that says Restore, Move, Size, Minimize, Maximize and Close. I would like no menu to appear at all, is there a simple disable command to do this? Thanks for any assistance in advance it is certainly appreciated! -K -K Link to comment Share on other sites More sharing options...
GEOSoft Posted April 20, 2011 Share Posted April 20, 2011 Thanks to rover we have this little piece of work. I just made the GUI creation part into a Function #Include<windowsconstants.au3> _GUI_NoIcon() $Lbl = GUICtrlCreateLabel("Test Label", 10, 10, 150, 25) GUISetState() While 1 If GUIGetMsg("Test GUI") = -3 Then Exit WEnd Func _GUI_NoIcon($sTitle = "", $iWidth = -1, $iHeight = -1, $iXpos = -1, $iYpos = -1) Local $GCL_HICONSM = -34, $GCL_HICON = -14 Local $hWnd = GUICreate($sTitle, $iWidth, $iHeight, $iXpos, $iYpos, _ BitOR($WS_CAPTION, $WS_SYSMENU), $WS_EX_DLGMODALFRAME) Local $hIcon = GetClassLong($hWnd, $GCL_HICON) DllCall("User32.dll", "int", "DestroyIcon", "hwnd", $hIcon) SetClassLong($hWnd, $GCL_HICON, 0) SetClassLong($hWnd, $GCL_HICONSM, 0) Return $hWnd EndFunc ;<==> _GUI_NoIcon() Func GetClassLong($hWnd, $nIndex) ;; By Rasim Local $hResult = DllCall("user32.dll", "dword", "GetClassLong", "hwnd", $hWnd, "int", $nIndex) Return $hResult[0] EndFunc ;<==> GetClassLong() Func SetClassLong($hWnd, $nIndex, $dwNewLong) ;; By Rasim Local $hResult = DllCall("user32.dll", "dword", "SetClassLong", "hwnd", $hWnd, "int", $nIndex, "long", $dwNewLong) Return $hResult[0] EndFunc ;<==> SetClassLong() George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
guinness Posted April 20, 2011 Share Posted April 20, 2011 Nice Example GEOSoft! For those who have x64 and use the x64 AutoIt Version, add #AutoIt3Wrapper_UseX64=N to the top of the Script.I hope you don't mind but I also modified the Script using the WinAPIEx.au3 and WinAPI.au3 Functions (this works in both x32/x64)#include <WinAPIEx.au3> ; www.autoitscript.com/forum/topic/98712-winapiex-udf/ _GUI_NoIcon() GUICtrlCreateLabel("Example Label", 10, 10, 150, 25) GUISetState(@SW_SHOW) While 1 If GUIGetMsg("Test GUI") = -3 Then Exit EndIf WEnd Func _GUI_NoIcon($sTitle = "", $iWidth = -1, $iHeight = -1, $iXpos = -1, $iYpos = -1) Local $hWnd = GUICreate($sTitle, $iWidth, $iHeight, $iXpos, $iYpos, _ BitOR($WS_CAPTION, $WS_SYSMENU), $WS_EX_DLGMODALFRAME) Local $hIcon = _WinAPI_GetClassLongEx($hWnd, $GCL_HICON) _WinAPI_DestroyIcon($hIcon) _WinAPI_SetClassLongEx($hWnd, $GCL_HICON, 0) _WinAPI_SetClassLongEx($hWnd, $GCL_HICONSM, 0) Return $hWnd EndFunc ;==>_GUI_NoIcon UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
GEOSoft Posted April 20, 2011 Share Posted April 20, 2011 I don't mind at all and I haven't seen rover around so I doubt that he is objecting either. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now