xin Posted May 25, 2006 Share Posted May 25, 2006 only colse button and no icon on title, how can i do that. use $WS_SYSMENU, i can get only close button but with icon, and use $WS_EX_TOOLWINDOW i get window without icon but also without close button. how can i make without icon and only with close button? thx! Link to comment Share on other sites More sharing options...
Uten Posted May 25, 2006 Share Posted May 25, 2006 I don't know how to create such a window in AutoIt but I have tried to remove the icon as described at msdn. Unfortunately it did not work, I probably goofed at some point. The SendMessage call is suposed to returne a handel to the icon in question but mine did not Maybee the code will give you ore someone else a idea?expandcollapse popup#include <GuiConstants.au3> HotKeySet("ESC", "Terminate") Local $form = GUICreate("", 200, 200,-1,-1,BitOr($WS_EX_DLGMODALFRAME ,$WS_SYSMENU)) Local $statuslabel = GUICtrlCreateLabel ("Ready",10,180,175,23,BitOr($SS_SIMPLE,$SS_SUNKEN)) GUISetState(@SW_SHOW) ; Remove Icons according to : http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/windows/windowreference/windowmessages/wm_seticon.asp local $ICON_SMALL = 0 Local $ICON_BIG = 1 Local $WM_SETICON = 128 Local $foo $foo = dllcall ("user32.dll","int", "SendMessage", "hwnd", WinGetHandle($form), "int", $WM_SETICON, "int", $ICON_SMALL, "int", 0) ; NOTE: I dont get a handel to the icon suposed to be removed so I probably have done something wrong? ConsoleWrite("ERROR?:" & ErrStrDllCall(@error) & " : IconHandel:=" & $foo & @LF) $foo = dllcall ("user32.dll","int", "SendMessage", "hwnd", WinGetHandle($form), "int", $WM_SETICON, "int", $ICON_BIG, "int", 0) ConsoleWrite("ERROR?:" & ErrStrDllCall(@error) & " : IconHandel:=" & $foo & @LF) While GUIGetMsg() <> - 3 WEnd Exit ; === Functions Func Terminate() Exit EndFunc Func ErrStrDllCall($err, $LogFunction="", $preMsg = "") Local $ret Switch @error case 0 Return case 1 $ret = 'unable to use the DLL file ' Case 2 $ret = 'unknown return type' Case 3 $ret = '"function" not found in the DLL file. ' EndSwitch If $LogFunction <> "" Then Call($LogFunction, $preMsg & ": " & $ret) EndIf Return $ret EndFunc Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
BigDod Posted May 25, 2006 Share Posted May 25, 2006 Try #include <GUIConstants.au3> ; == GUI generated with Koda ==); $Form1 = GUICreate("Shut Down Windows", 622, 449, 192, 125, BitOR($WS_SYSMENU,$WS_CAPTION,$WS_POPUPWINDOW,$WS_BORDER,$WS_CLIPSIBLINGS), BitOR($WS_EX_APPWINDOW,$WS_EX_TOOLWINDOW,$WS_EX_WINDOWEDGE)) GUISetState(@SW_SHOW) While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else ;;;;;;; EndSelect WEnd Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
Uten Posted May 25, 2006 Share Posted May 25, 2006 Not to criticize your efforts @BigDod but isn't that the same as @xin told us he already could do? $Form1 = GUICreate("Shut Down Windows", 622, 449, 192, 125, -1, $WS_EX_TOOLWINDOW) I think he wants the BIG X button, and not the tiny one Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
BigDod Posted May 25, 2006 Share Posted May 25, 2006 (edited) Not to criticize your efforts @BigDod but isn't that the same as @xin told us he already could do? $Form1 = GUICreate("Shut Down Windows", 622, 449, 192, 125, -1, $WS_EX_TOOLWINDOW) I think he wants the BIG X button, and not the tiny one He said that he did not get a cross. Edited May 25, 2006 by BigDod Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
xin Posted May 25, 2006 Author Share Posted May 25, 2006 He said that he did not get a cross.thx for all answers. i want really the big cross. is that possible? Link to comment Share on other sites More sharing options...
BigDod Posted May 26, 2006 Share Posted May 26, 2006 Here is a rough idea to get you started #include <GUIConstants.au3> ; == GUI generated with Koda ==); $Form1 = GUICreate("AForm1", 622, 424, 192, 125, BitOR($WS_SYSMENU,$WS_POPUPWINDOW,$WS_BORDER,$DS_MODALFRAME), 0) $Button1 = GUICtrlCreateButton("X", 592, 9, 22, 22, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0xFFFFFF) $Graphic1 = GUICtrlCreateGraphic(0, 0, 625, 41) GUICtrlSetColor(-1, 0xECE9D8) GUICtrlSetBkColor(-1, 0x0054E3) GUICtrlSetState(-1, $GUI_DISABLE) GUISetState(@SW_SHOW) While 1 $msg = GuiGetMsg() Select Case $msg = $Button1 ExitLoop Case Else ;;;;;;; EndSelect WEnd If you want round corners there is something in Scripts and Scraps somewhere (if I remember correctly) Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
JoshDB Posted May 29, 2006 Share Posted May 29, 2006 Look in the 'AutoIt Wrappers' post. You can find the round-corners script near the end, on page 4. BigDod actually linked it, look for his avatar. 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 More sharing options...
Iznogoud Posted June 1, 2006 Share Posted June 1, 2006 What i want to know is how i can insert my program on the button of start > shutdown. For an example: If you press start > shutdown Windows will start some program of microsoft wich displays the shutdown window. What i want to do is adjust the path to my program, so i can write a advanced shutdown program. Anyone knows where i can change it or if its even possible? Link to comment Share on other sites More sharing options...
Valuater Posted June 1, 2006 Share Posted June 1, 2006 (edited) there is a script to "notify of shutdown" in the Autoit Wrappers also8)in my sig belowtitle = terminate a script right before a user shutspage 4 Edited June 1, 2006 by Valuater Link to comment Share on other sites More sharing options...
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