Jump to content

Create a window with no title bar


Recommended Posts

Just wondering how to create a window with no title bar, but still with a window border.

Here is a screenshot of what I'm trying to accomplish:

post-53496-12602530176126_thumb.png

Try Pacfox, my Firefox theme.Try Power Eject, my windows gadget that allows you to eject most drives.Using AutoIt 3.3.4.0, Windows 7 Premium, Intel Core 2 Quad CPU @ 2.66ghz, 4gb RAM, Nvidia GeForce 9500GT Graphics Card & Samsung 22" Monitor.
Link to comment
Share on other sites

not natively in autoit but you can call a dll function to do so

DllCall("user32.dll", "int", "SetWindowLong", "hwnd", $hWnd, "int", 0xFFFFFFF0, "int", $WS_BORDER)

just make sure you exclude the value for the caption, i believe it's 0x00020000 but i'm not sure (WS_CAPTION includes WS_BORDER)

Edited by skyboy
Link to comment
Share on other sites

Try like this:

#include <WindowsConstants.au3>

GUICreate("Test", Default, Default, Default, Default, BitOR($WS_POPUP, $WS_SIZEBOX))
GUISetState()

Do
    Sleep(10)
Until GUIGetMsg() = -3
Link to comment
Share on other sites

not natively in autoit but you can call a dll function to do so

DllCall("user32.dll", "int", "SetWindowLong", "hwnd", $hWnd, "int", 0xFFFFFFF0, "int", $WS_BORDER)

just make sure you exclude the value for the caption, i believe it's 0x00020000 but i'm not sure (WS_CAPTION includes WS_BORDER)

That gives a really messed up window with no shadow and a solid white window border on Windows 7.

Try like this:

#include <WindowsConstants.au3>

GUICreate("Test", Default, Default, Default, Default, BitOR($WS_POPUP, $WS_SIZEBOX))
GUISetState()

Do
    Sleep(10)
Until GUIGetMsg() = -3

Works really nice, but there's no composition effects for the program on Windows 7 now...which I can live with if it's the only way to do it...

Although somehow, the other program in the preview(TeraTerm)managed to keep the composition effects...

Try Pacfox, my Firefox theme.Try Power Eject, my windows gadget that allows you to eject most drives.Using AutoIt 3.3.4.0, Windows 7 Premium, Intel Core 2 Quad CPU @ 2.66ghz, 4gb RAM, Nvidia GeForce 9500GT Graphics Card & Samsung 22" Monitor.
Link to comment
Share on other sites

Works really nice, but there's no composition effects for the program on Windows 7 now...which I can live with if it's the only way to do it...

Although somehow, the other program in the preview(TeraTerm)managed to keep the composition effects...

I don't understand what you mean. It looks pretty much like your picture to me?
Link to comment
Share on other sites

No minimize/close/restore/open effects on 7...because of the $WS_POPUP is what I meant...but otherwise perfect...

Try Pacfox, my Firefox theme.Try Power Eject, my windows gadget that allows you to eject most drives.Using AutoIt 3.3.4.0, Windows 7 Premium, Intel Core 2 Quad CPU @ 2.66ghz, 4gb RAM, Nvidia GeForce 9500GT Graphics Card & Samsung 22" Monitor.
Link to comment
Share on other sites

That gives a really messed up window with no shadow and a solid white window border on Windows 7.

because i used a value from windows xp, and didn't mean it for production use, but instead intended you use the values in the help file/off msdn to get the look you wanted?

edit:

;
    DllCall($vDll, "int", "SetWindowLong", "hwnd", $hWnd, "int", 0xFFFFFFF0, "int", $Your_value1);~     STYLE    0xFFFFFFF0
    DllCall($vDll, "int", "SetWindowLong", "hwnd", $hWnd, "int", 0xFFFFFFEC, "int", $Your_value2) ;~    EXSTYLE  0xFFFFFFEC

the glow border info may be in the ex style, or other things on msdn.com

Edited by skyboy
Link to comment
Share on other sites

  • 4 weeks later...

How would I do this without making the window resizable? I tried a couple of combinations...none of them worked...

I also managed to imitate the composition effects with a simple DllCall:

DllCall('user32.dll', 'int', 'AnimateWindow', 'hwnd', $hGUI, 'int', 125, 'long', 0x80000)
Edited by Vadersapien
Try Pacfox, my Firefox theme.Try Power Eject, my windows gadget that allows you to eject most drives.Using AutoIt 3.3.4.0, Windows 7 Premium, Intel Core 2 Quad CPU @ 2.66ghz, 4gb RAM, Nvidia GeForce 9500GT Graphics Card & Samsung 22" Monitor.
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...