Sign in to follow this  
Followers 0
J0ker

GUI Control Styles

14 posts in this topic

#1 ·  Posted (edited)

I read the helpfile and tried alot if things but I cannot find the correct control style.

I'm looking for a style that has:

- Title Bar

- 3 buttons (exit,minimise,maximise) removed

- icon image

- keep the size of my window correct

I cannot make the good mix to have all those things together. Can someone help me out?

GuiCreate("Title", 391, 187,-1, -1,;HERE)
GuiSetIcon(@AutoItExe, -1)
Edited by J0ker

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

I read the helpfile and tried alot if things but I cannot find the correct control style.

I'm looking for a style that has:

- Title Bar

- 3 buttons (exit,minimse,maximise) removed

- icon image

I cannot make the good mix to have all those things together. Can someone help me out?

GuiCreate("Title", 391, 187,-1, -1,;HERE)
GuiSetIcon(@AutoItExe, -1)
oÝ÷ Ûú®¢×v+Gj÷²¢ëkçm+ºÚ"µÍÝZPÜX]J ][ÝÕ]I][ÝËÎLKN
ËLKLK  ÌÍÑ×ÓSÑSSQJBÝZTÙ]XÛÛ]]Ò]^KLJ
Edited by EndFunc

EndFuncAutoIt is the shiznit. I love it.

Share this post


Link to post
Share on other sites

Have you tried this?

GuiCreate("Title", 391, 187,-1, -1,$DS_MODALFRAME)
GuiSetIcon(@AutoItExe, -1)
Yes I have tried this. It makes my gui box way to small and the icon's image doesnt appear. It doesnt work.

Share this post


Link to post
Share on other sites

If you add in $WS_CAPTION the window will be sized properly, but I don't know how to add an icon.

...

It's funny, you want to add the icon, and I wanted to remove it.

So, without intending to hijack your thread, in the case that someone figures out yours, I was wondering if anyone knows the style to create a window (not $WS_EX_TOOLWINDOW style though) without the top left icon, but WITH the [x] close button. Kind of like the [start] > Run dialog but without the [?] help button.

Share this post


Link to post
Share on other sites

Nobody can help me ? :whistle:

I have tried again all styles but I cannot find the good one

Share this post


Link to post
Share on other sites

Nobody can help me ? :whistle:

I have tried again all styles but I cannot find the good one

When you want to bump... don't delete the last post and just re-post the same exact post again... that's just tacky. I personally don't feel like going through and trying to understand what the hell your talking about is why I haven't answered.

[center]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.[/center]

Share this post


Link to post
Share on other sites

Well if you dont know what I'm talking about then say it. That way I can clarify my problem and maybe you will be able to help me. My problem is not complicated, I just cant find the good style for my gui. If it's impossible then say it, I will stop losing my time finding the answer.

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Well if you dont know what I'm talking about then say it. That way I can clarify my problem and maybe you will be able to help me. My problem is not complicated, I just cant find the good style for my gui. If it's impossible then say it, I will stop losing my time finding the answer.

Well, I typically try not to post in threads I don't understand, or don't care to help in... so why would I say it?

You say you want the whole enchilada, but I'm confused on that period.

3 things, minimize, resize, exit.

icon from executable

Title

I compiled this, and got exactly that:

GuiCreate("Title", 391, 187)
GuiSetIcon(@AutoItExe, -1)

GUISetState()
While GUIGetMsg() <> -3
WEnd

Of course the "restore" is disabled, because I haven't set the settings to have it re-sizable.

Try posting a working example, that shows your issue, rather than making others jump through hoops for you, you'd probably find the answer a hell of a lot faster.

Edited by SmOke_N

[center]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.[/center]

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

Your right, I wasnt very clear.

I want a style with:

3 things, minimize, resize, exit. REMOVED ( A plain title bar without those 3 buttons)

icon from executable

Title

In short I want a title + icon from executable ONLY!

I tried all styles from the helpfile and no one fitted my need.

#include <GuiConstants.au3>

GuiCreate("Title", 391, 187,-1, -1)
GuiSetIcon(@AutoItExe, -1)

GUISetState()

While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case Else
        
    EndSelect
WEnd
Exit
Edited by J0ker

Share this post


Link to post
Share on other sites

Well, for the life of me, trying GUIRegisterMsg()/_SendMessage()/Playing with WM_SETICON, etc... I couldn't get the damn thing right... The best I could do was disable the close button

;Global Const $WM_SETICON = 0x80
#include <GuiConstants.au3>
;#include <Misc.au3>

$gui = GuiCreate("Title", 391, 187,-1, -1, BitOR($WS_SYSMENU, $WS_CAPTION))
_GUIDisableClose($gui)
GUISetState()

While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case Else
       
    EndSelect
WEnd

Func _GUIDisableClose($hWnd)
    Local $hU32DLL = DllCall('user32.dll', 'int', 'GetSystemMenu', 'hwnd', $hWnd, 'int', 0)
    DllCall('user32.dll', 'int', 'RemoveMenu', 'hwnd', $hU32DLL[0], 'int', 0xF060, 'int', 0x00000001)
    DllCall('user32.dll', 'int', 'DrawMenuBar', 'hwnd', $hWnd)
    Return
EndFunc


[center]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.[/center]

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

Thx for your help! I will use this.

So in short, there's no way to keep the icon's image and remove the three buttons at all?

Edited by J0ker

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

So in short, there's no way to keep the icon's image and remove the three buttons at all?

Well, I don't believe that for 1 second... I'm just saying I couldn't find a way personally.

Edit:

I mean I couldn't find a way to do it and keep the icon.

Edited by SmOke_N

[center]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.[/center]

Share this post


Link to post
Share on other sites

How about for my problem Smoke? :whistle:

No program icon in titlebar, just the [x] (like the Run dialog without a [?]).

Share this post


Link to post
Share on other sites

How about for my problem Smoke? :whistle:

No program icon in titlebar, just the [x] (like the Run dialog without a [?]).

I was asked this question last year I think... I don't think I ever figured it out to be honest Saunder... sorry man.

[center]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.[/center]

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  
Followers 0