J0ker Posted March 5, 2007 Posted March 5, 2007 (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 March 5, 2007 by J0ker
EndFunc Posted March 5, 2007 Posted March 5, 2007 (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 March 5, 2007 by EndFunc EndFuncAutoIt is the shiznit. I love it.
J0ker Posted March 6, 2007 Author Posted March 6, 2007 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.
therks Posted March 6, 2007 Posted March 6, 2007 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. My AutoIt Stuff | My Github
J0ker Posted March 6, 2007 Author Posted March 6, 2007 Nobody can help me ? I have tried again all styles but I cannot find the good one
Moderators SmOke_N Posted March 6, 2007 Moderators Posted March 6, 2007 Nobody can help me ? I have tried again all styles but I cannot find the good oneWhen 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. 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.
J0ker Posted March 6, 2007 Author Posted March 6, 2007 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.
Moderators SmOke_N Posted March 6, 2007 Moderators Posted March 6, 2007 (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 March 6, 2007 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.
J0ker Posted March 6, 2007 Author Posted March 6, 2007 (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 executableTitleIn 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 March 6, 2007 by J0ker
Moderators SmOke_N Posted March 6, 2007 Moderators Posted March 6, 2007 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 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.
J0ker Posted March 6, 2007 Author Posted March 6, 2007 (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 March 6, 2007 by J0ker
Moderators SmOke_N Posted March 6, 2007 Moderators Posted March 6, 2007 (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 March 6, 2007 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.
therks Posted March 8, 2007 Posted March 8, 2007 How about for my problem Smoke? No program icon in titlebar, just the [x] (like the Run dialog without a [?]). My AutoIt Stuff | My Github
Moderators SmOke_N Posted March 8, 2007 Moderators Posted March 8, 2007 How about for my problem Smoke? 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. 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now