Jump to content
Sign in to follow this  

Moving window, removing title and borders

Recommended Posts

Hey guys, just started using autoit today and trying to get a script working just how I want it.

The goal is to move a window, remove the title bar and borders completely. Reading some tutorials, searching the forum and looking at the wiki i've pretty much nailed it.. and if I couldn't get it any more than this I suppose I'd live (Maybe, I mean it's a long shot). So far I've moved the window, removed the title bar, but the borders are still there and I'm not sure what variable i'm missing.


; Wait for the Bluestacks 
WinWaitActive("BlueStacks App Player for Windows (beta-1)")

; Get the window class
Local Const $hWnd = WinGetHandle("[CLASS:WindowsForms10.Window.8.app.0.33c0d9d]")
If @error Then MsgBox(0, "error", "error")

Local $iStyle = _WinAPI_GetWindowLong($hWnd, $GWL_STYLE)


_WinAPI_SetWindowLong($hWnd, $GWL_STYLE, $iStyle)
_WinAPI_SetWindowPos($hWnd, $HWND_TOPMOST, 3360, -40, 241, 473, $SWP_FRAMECHANGED)

I was also trying to add in $SWP_NOSIZE at the end of _WinAPI_SetWindowPos but get an error "Incorrect number of parameters in function call" and I'm not sure why.

Any help is greatly appreciated. Thanks guys.

Oh while I'm at it, anyway to set the anchor point when moving a window, like I want to set it at 0,0 using topright instead of topleft as it seems to be now?

Edited by inb4tehlulz

Share this post

Link to post
Share on other sites

You can cut off the border with WinAPI aswell....

_WinAPI_SetWindowRgn(WinGetHandle("Title", ""), _WinAPI_CreateRectRgn(3, 22, 1024, 768)) ; Cut off Window Border

Look into those commands.

Some guy's script + some other guy's script = my script!

Share this post

Link to post
Share on other sites

I think this would do what you asked for

$iStyle = BitAnd($iStyle, BitNot( $WS_BORDER))

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...