Jump to content

Removing minimise and maximize button - (Moved)


Recommended Posts

I would like to remove those buttons as I am trying for a project in my class to make the 'best' visitor using windows server and so far I have use the custom user interface with edge which gives me a just a edge window. No taskbar or anything but that means if they minimise edge just disappears until you alt-tab to get it back in a hypothetical situation I can't expect everyone to know alt tab, if there is away to remove those buttons that would great.

 

I did find some autoitscript scripts on the forums that kind of work but I can't get them to work for edge.

Link to post
Share on other sites
22 minutes ago, Zedna said:
$gui = GUICreate("Title", 400, 300, -1, -1, BitOR($WS_CAPTION, $WS_POPUP, $WS_SYSMENU))

or

$gui = GUICreate("Title", 400, 300, -1, -1, BitOR($WS_CAPTION, $WS_POPUP, $WS_SYSMENU), $WS_EX_TOOLWINDOW)

 

I am a real newbie at autoitscript so I not entirely sure what to with this as looking through that it doesn't mention edge at all.  

Link to post
Share on other sites

This is working:

#include <WindowsConstants.au3>
#include <WinAPISysWin.au3>

$hWnd = WinGetHandle('Title')
If IsHWnd($hWnd) Then
    _WinAPI_SetWindowLong($hWnd, $GWL_STYLE, BitOR($WS_CAPTION, $WS_POPUP, $WS_SYSMENU, $WS_VISIBLE))
EndIf

This is more general, but doesn' work:

#include <WindowsConstants.au3>
#include <WinAPISysWin.au3>

$hWnd = WinGetHandle('Title')
If IsHWnd($hWnd) Then
    $style = _WinAPI_GetWindowLong($hWnd, $GWL_STYLE)
    _WinAPI_SetWindowLong($hWnd, $GWL_STYLE, BitAND($style, BitNOT($WS_MINIMIZE), BitNOT($WS_MAXIMIZE)))
EndIf

 

Link to post
Share on other sites
#include <WinAPI.au3>
#include <Constants.au3>
#include <WindowsConstants.au3>
#include <GuiMenu.au3>

$windows = WinList()

For $i =1 To $windows[0][0]
    $windowState =  WinGetState($windows[$i][1])
    $isVisible = BitAND($windowState,2) = 2
    If $windows[$i][0] = '' Or not $isVisible Then ContinueLoop

    $h = $windows[$i][1]
    $iOldStyle = _WinAPI_GetWindowLong($h, $GWL_STYLE)
    $iNewStyle = BitXOr($iOldStyle, $WS_SYSMENU)
    _WinAPI_SetWindowLong($h, $GWL_STYLE, $iNewStyle)
    _WinAPI_ShowWindow($h, @SW_SHOW)
Next

I found this one online but it doesn't work for Microsoft edge (browser)

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...