How to make GUI movable (buttons covers the title bar)

Get help with using AutoHotkey and its commands and hotkeys
User avatar
Nwb
Posts: 431
Joined: 29 Nov 2016, 08:56

How to make GUI movable (buttons covers the title bar)

17 Apr 2018, 02:46

Code:

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus



Preview:
marry.png
marry.png (27.58 KiB) Viewed 66 times


As you can see, the X, [] and - buttons completely dominate the titlebar. This makes it so that the GUI is immovable.

I want to move the GUI though.

So how do I make it so that either
1) [] (maximize button) does not exist.
2) Clicking and dragging the GUI will move it.
3) Clicking and dragging the titlebar will move it.

I don't know if all three are possible but if they are, then it's great! Thanks a lot! :D
I am your average ahk newbie. Just.. a tat more cute. ;)
User avatar
Nwb
Posts: 431
Joined: 29 Nov 2016, 08:56

Re: How to make GUI movable (buttons covers the title bar)

17 Apr 2018, 04:51

gamergames wrote:try

gui -MinimizeBox


Hey buy,

I really appreciate it! I didn't realize that it would entirely remove the buttons. But is there anyway to also have a minimize button in the titlebar but just not the maximize? Or even remove the title icon entirely? Or I have to include those inside the GUI itself?

One con is that I cannot move the GUi without a titlebar. I would have to use a timer with mousegetpos which I want to avoid. And then I need to make custome images. So I want to avoid removing the titlebar entirely.

Cheers! :D
I am your average ahk newbie. Just.. a tat more cute. ;)
Odlanir
Posts: 267
Joined: 20 Oct 2016, 08:20

Re: How to make GUI movable (buttons covers the title bar)

17 Apr 2018, 06:49

You can move any gui by left-click and drag with this:

Code: [Select all] [Download] GeSHi © Codebox Plus

OnMessage(0x0201, "WM_LBUTTONDOWN")
gui,show, w200 h200
return

WM_LBUTTONDOWN() {
If (A_Gui)
PostMessage, 0xA1, 2
}

____________________________________________________________________________
Windows 7 Home Premium 64 bit - Autohotkey v1.1.24.02 64-bit Unicode

Return to “Ask For Help”

Who is online

Users browsing this forum: donovv, Google [Bot], wolfmagic and 31 guests