kjactive 1 Posted September 27, 2007 General questen? How do i make a window resizeable and move/dragable without any titlebar at all - is this posible at all kjactive Au3PP 4.1 - Autoit3 preprocessor, optimize speed, performance to scripts and do executes....[/url]Au3Calibur - Create libraries of commonly used code excerptsWords manipulate UDF, functions that is lent from the rexx language, topics and index file includedCustomDialog UDF to include custom made dialogs like a extended colorpick requester to scripts...[url="ftp://fritidshjemmet.com/Autoit3/SysColor.zip"]SysColor UDF a low level color library to manipulate RGB and Hex values...Shell32 UDF to Automate Windows® operating tasks from native dialog and Wizards browsers... Optimized the CodeWicard with options to generate browser code etc... Share this post Link to post Share on other sites
Zedna 293 Posted September 27, 2007 (edited) #include <GUIConstants.au3> Opt("GUIOnEventMode",1) Const $HTCAPTION = 2 Const $WM_NCLBUTTONDOWN = 0xA1 $gui = GuiCreate("Title",300,200,-1,-1,$WS_SIZEBOX);,BitOr($WS_EX_TOPMOST,$WS_EX_TOOLWINDOW)) GUISetOnEvent ($GUI_EVENT_CLOSE, "Quit" ) GUISetOnEvent ($GUI_EVENT_PRIMARYDOWN, "Drag" ) GUISetState(@SW_SHOW) While 1 Sleep(100) WEnd Func Drag() dllcall("user32.dll","int","ReleaseCapture") dllcall("user32.dll","int","SendMessage","hWnd", $gui,"int",$WM_NCLBUTTONDOWN,"int", $HTCAPTION,"int", 0) EndFunc Func Quit() Exit EndFuncEDIT:without titlebar use:$gui = GuiCreate("Title",300,200,-1,-1,BitOR($WS_POPUP,$WS_BORDER,$WS_SIZEBOX)) Edited September 27, 2007 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Share this post Link to post Share on other sites
Siao 6 Posted September 27, 2007 (edited) Neat trick, Zedna Although if that window is going to have any controls that require mouse interaction (buttons, sliders and such), you'd have to change Drag() function to something like this: Func Drag() $a = GUIGetCursorInfo($gui) If $a[4] = 0 Then ;or exclude specific controlIDs dllcall("user32.dll","int","ReleaseCapture") dllcall("user32.dll","int","SendMessage","hWnd", $gui,"int",$WM_NCLBUTTONDOWN,"int", $HTCAPTION,"int", 0) EndIf EndFuncoÝ÷ ÚìjeÉ«¢+ÙÕ¹É ¤(%±±±° ÅÕ½ÐíÕÍÈÌȹ±°ÅÕ½Ðì°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°ÅÕ½ÐíM¹5ÍÍÅÕ½Ðì°ÅÕ½Ðí¡]¹ÅÕ½Ðì°ÀÌØíÕ¤°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°ÀÌØí]5}9 1 UQQ=9=]8°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°ÀÌØí!Q AQ%=8°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°À¤)¹Õ¹ Otherwise those controls wouldn't work. Edited September 27, 2007 by Siao "be smart, drink your wine" Share this post Link to post Share on other sites
Zedna 293 Posted September 27, 2007 Neat trick, Zedna Although if that window is going to have any controls that require mouse interaction (buttons, sliders and such), you'd have to change Drag() function to something like this:Otherwise those controls wouldn't work.I know about this limitation.Your workaround is nice ;-) Resources UDF ResourcesEx UDF AutoIt Forum Search Share this post Link to post Share on other sites
Siao 6 Posted September 27, 2007 Yea, on closer inspection I'm not sure what's the purpose of that ReleaseCapture() in first place, unless you want the controls not functioning. "be smart, drink your wine" Share this post Link to post Share on other sites
kjactive 1 Posted September 28, 2007 Thanks for responce - just what I needed... kjactive Au3PP 4.1 - Autoit3 preprocessor, optimize speed, performance to scripts and do executes....[/url]Au3Calibur - Create libraries of commonly used code excerptsWords manipulate UDF, functions that is lent from the rexx language, topics and index file includedCustomDialog UDF to include custom made dialogs like a extended colorpick requester to scripts...[url="ftp://fritidshjemmet.com/Autoit3/SysColor.zip"]SysColor UDF a low level color library to manipulate RGB and Hex values...Shell32 UDF to Automate Windows® operating tasks from native dialog and Wizards browsers... Optimized the CodeWicard with options to generate browser code etc... Share this post Link to post Share on other sites
Bert 1,437 Posted October 18, 2007 This is exactly what I needed. Simple, neat, no muss, no fuss. Nice work! The Vollatran project My blog: http://www.vollysinterestingshit.com/ Share this post Link to post Share on other sites
Bert 1,437 Posted October 18, 2007 In testing, I noticed something between beta and production AutoIt versions: 3.2.8.1 will run the script with no errors Beta (3.2.9.3) gives a error: (6,31) : ERROR: $WM_NCLBUTTONDOWN previously declared as a 'Const' Const $WM_NCLBUTTONDOWN = 0xA1 I can comment the line out, and it will run no problem. The only thing I can think of is GUIConstants may have been changed. No biggy here for the fix is simple. Just something I found. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Share this post Link to post Share on other sites
SmOke_N 211 Posted October 18, 2007 In testing, I noticed something between beta and production AutoIt versions: 3.2.8.1 will run the script with no errors Beta (3.2.9.3) gives a error: (6,31) : ERROR: $WM_NCLBUTTONDOWN previously declared as a 'Const' Const $WM_NCLBUTTONDOWN = 0xA1 I can comment the line out, and it will run no problem. The only thing I can think of is GUIConstants may have been changed. No biggy here for the fix is simple. Just something I found.I'm sure Gary added this when he added his trunk full of GUI functions. 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. Share this post Link to post Share on other sites