Jump to content

Titlebar Without Icon But With Minimize Button Only?


Recommended Posts

OK, I've studied the help and searched the forums, but I can't find the answer to this question:

How can I create a GUI that

(1) has no icon at all at the left side of the title bar (Title text is flush left on the title bar) and

(2) has a minimize button at the right of the title bar?

I know that this creates a GUI with a plain title bar, no icons:

GuiCreate("Hello, world!", 200, 75, -1, -1 , $WS_DLGFRAME)

But how do I get that minimize button in there? I tried

, BitOR($WS_ DLGFRAME, $WS_MINIMIZE)),

but that doesn't work at all.

Thanks for any help

Link to comment
Share on other sites

Windows does not support a dialog title with only minimize.

If you desperately need that ability, I suggest a title-less window with a minimize button of your own.

No - no desperate need for a minimize box. How about only a close button, though, is that possible? I can't find anything specific about this in the help.

Link to comment
Share on other sites

#include <GUIConstants.au3>

GUICreate("zzz", 500, 500,-1,-1,$WS_SYSMENU)

GuiSetState()

while GUIGetMsg() <> $GUI_EVENT_CLOSE

WEnd

Exit

Ha, I haven't been on these forums since... 2006, almost. Behold, my legacy signature:My AutoIt idol is Valuater. You know you love him, too.My Stuff: D&D AGoT Tools Suite
Link to comment
Share on other sites

#include <GUIConstants.au3>

GUICreate("zzz", 500, 500,-1,-1,$WS_SYSMENU)

GuiSetState()

while GUIGetMsg() <> $GUI_EVENT_CLOSE

WEnd

Exit

Thanks for that - but is there any way to remove the system-menu icon on the left, or is that obligatory when there's a GUI close button, so that people can close the window from the keyboard?

Link to comment
Share on other sites

  • Moderators

Thanks for that - but is there any way to remove the system-menu icon on the left, or is that obligatory when there's a GUI close button, so that people can close the window from the keyboard?

Is this for part of your other posts about making a msgbox? If it is, I may have a solution for you here: http://www.autoitscript.com/forum/index.ph...ndpost&p=185158

You can use this and still be able to continue on with your script... Unless you are needing a return value back from the message box itself.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Is this for part of your other posts about making a msgbox? If it is, I may have a solution for you here: http://www.autoitscript.com/forum/index.ph...ndpost&p=185158

You can use this and still be able to continue on with your script... Unless you are needing a return value back from the message box itself.

Yes - that looks very helpful (and I don't need a return value back from the box - I simply want to give the user an option to close it while the script continues with nothing showing but a tray icon). Since everything else in the script uses a title bar with no "system menu" icon at the left end, I was hoping to keep a consistent look as much as possible.

Thanks again!

Link to comment
Share on other sites

  • Moderators

OK, I've studied the help and searched the forums, but I can't find the answer to this question:

How can I create a GUI that

(1) has no icon at all at the left side of the title bar (Title text is flush left on the title bar) and

(2) has a minimize button at the right of the title bar?

I know that this creates a GUI with a plain title bar, no icons:

GuiCreate("Hello, world!", 200, 75, -1, -1 , $WS_DLGFRAME)

But how do I get that minimize button in there? I tried

, BitOR($WS_ DLGFRAME, $WS_MINIMIZE)),

but that doesn't work at all.

Thanks for any help

#include <GUIConstants.au3>
GUICreate("zzz", 500, 500,-1,-1,$WS_SYSMENU)
GuiSetState()

while 1
$msg = GUIGetMsg()  
Select
case $msg = $GUI_EVENT_CLOSE
    GUISetState(@SW_MINIMIZE)
EndSelect
WEnd
Exit
He wants "No Icon", if you compile yours with an icon, your still going to get an icon, so if he's running his script with an icon for the other GUI's, and he has this pop up, he's looking for the text only, which this will not give unfortunately.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

He wants "No Icon", if you compile yours with an icon, your still going to get an icon, so if he's running his script with an icon for the other GUI's, and he has this pop up, he's looking for the text only, which this will not give unfortunately.

I think, if I want to be able to minimize, I'll have to live with the icon. The reason I'm trying to avoid the icon is that the MsgBox function (which I use dozens of times) seems to be limited to an ugly little white-box icon, and and I'd rather not have any icon at all if that's the one I can have. But maybe AutoIt 4.0 will include an option for a custom icon in the message box...

Link to comment
Share on other sites

  • Moderators

I think, if I want to be able to minimize, I'll have to live with the icon. The reason I'm trying to avoid the icon is that the MsgBox function (which I use dozens of times) seems to be limited to an ugly little white-box icon, and and I'd rather not have any icon at all if that's the one I can have. But maybe AutoIt 4.0 will include an option for a custom icon in the message box...

I doubt that request will ever be filled considering that the MsgBox is using the default windows messagebox api calls. So unless windows changes something....

On the other hand, what flag are you using (button combinations?). None of my MsgBox()'s have any type of set application icon (they have none at all).

Edit:

I just tried all the Window API calls for MB_ and none of them did what you wanted.

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

I doubt that request will ever be filled considering that the MsgBox is using the default windows messagebox api calls. So unless windows changes something....

On the other hand, what flag are you using (button combinations?). None of my MsgBox()'s have any type of set application icon (they have none at all).

I don't have any icons on MsgBoxes either (I use mostly 8192 plus various squares of 2 for warnings, etc.), but you'll see an icon if you use 4096, as I was doing when I started out.

One reason I wanted an icon here is that one or two parts of my script use an Input box, and they use the default AutoIt icon, so there's some inconsistency there. I've thought of writing a GUI input box without an icon, but otherwise identical to the default one, but haven't gone to the trouble yet.

Link to comment
Share on other sites

  • Moderators

If you want a truly customizable messagbox and want to go through some hassles of getting everything just right, you could check out this link: http://www.codeproject.com/dialog/xmessagebox.asp

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

If you want a truly customizable messagbox and want to go through some hassles of getting everything just right, you could check out this link: http://www.codeproject.com/dialog/xmessagebox.asp

Never knew about that before - it looks really nice, but I don't have a clue about how to use it in AutoIt - would be very nice if its features could be integrated here. Maybe someday...!

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...