kjactive Posted September 27, 2007 Share 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... Link to comment Share on other sites More sharing options...
Zedna Posted September 27, 2007 Share 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 Link to comment Share on other sites More sharing options...
Siao Posted September 27, 2007 Share 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" Link to comment Share on other sites More sharing options...
Zedna Posted September 27, 2007 Share 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 Link to comment Share on other sites More sharing options...
Siao Posted September 27, 2007 Share 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" Link to comment Share on other sites More sharing options...
kjactive Posted September 28, 2007 Author Share 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... Link to comment Share on other sites More sharing options...
Bert Posted October 18, 2007 Share 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/ Link to comment Share on other sites More sharing options...
Bert Posted October 18, 2007 Share 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/ Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted October 18, 2007 Moderators Share 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. 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