FrashMX Posted March 20, 2005 Share Posted March 20, 2005 Hola, Is it possible to make a part of a window w/o titlebar (or at least an alternative titlebar by using images) draggable, so you can drag it over the screen by clicking the "virtual" titlebar? Thanks in advance! Link to comment Share on other sites More sharing options...
FrashMX Posted March 22, 2005 Author Share Posted March 22, 2005 Nobody a clue yet? (Srry for the bumping) Link to comment Share on other sites More sharing options...
FrashMX Posted March 22, 2005 Author Share Posted March 22, 2005 Will do, thanks for the input! Link to comment Share on other sites More sharing options...
FrashMX Posted March 25, 2005 Author Share Posted March 25, 2005 I was thinking maybe a simulation would fit for the purpose. You click a button or an image in this case and: 1) The cursor changes to the one with 4 arrows 2) The cursor will track moves and update the window position w/ the new co-ords asap 3) When the mouse button is released, the cursor reverts and it will stop tracking movements. Link to comment Share on other sites More sharing options...
SlimShady Posted March 25, 2005 Share Posted March 25, 2005 That's a great idea. I'll see if I can make this happen. Link to comment Share on other sites More sharing options...
CyberSlug Posted March 25, 2005 Share Posted March 25, 2005 #68896 Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
SlimShady Posted March 25, 2005 Share Posted March 25, 2005 It took me a while but I made it See attachment. Instructions: Click on the label (and hold) and move your mouse. Link to comment Share on other sites More sharing options...
this-is-me Posted March 25, 2005 Share Posted March 25, 2005 Are you guys thinking too hard lately? #include <guiconstants.au3> Opt("GuiOnEventMode", 1) $HTCAPTION = 2 $WM_NCLBUTTONDOWN = 0xA1 $winttl = "Test" $guihndl = GUICreate($winttl, 500, 300, -1, -1) GUISetOnEvent($GUI_EVENT_PRIMARYDOWN, "captureit") GUISetState(@SW_SHOW) Sleep(50000) func captureit() dllcall("user32.dll","int","ReleaseCapture") dllcall("user32.dll","int","SendMessage","hWnd", $guihndl,"int",$WM_NCLBUTTONDOWN,"int", $HTCAPTION,"int", 0) EndFunc Drag the window with the body. Who else would I be? Link to comment Share on other sites More sharing options...
FrashMX Posted March 25, 2005 Author Share Posted March 25, 2005 Awesome, thanks! I think my intuition is right, this community rocks Link to comment Share on other sites More sharing options...
FrashMX Posted March 25, 2005 Author Share Posted March 25, 2005 Srry I have a small offtopic question but I dont want to filth the forum with another thread; My GUI is partially transparent and has an image overlay. You can compare it to Winamp, an image based GUI. The problem is, when I place a button ON the image it does not; 1) Get the "pushed" look when clicked 2) Perform its task. Is there a reason why a button on a transparent image behaves weird? Link to comment Share on other sites More sharing options...
eJan Posted March 26, 2005 Share Posted March 26, 2005 If You use: $n=GUICtrlCreatePic(@Systemdir & "\oobe\images\mslogo.jpg",50,50, 200,50)Then: GUICtrlSetState($n, $GUI_DISABLE)(to disable picture control), in this case button should work. Link to comment Share on other sites More sharing options...
FrashMX Posted March 26, 2005 Author Share Posted March 26, 2005 Did the trick, ta! Link to comment Share on other sites More sharing options...
FrashMX Posted March 26, 2005 Author Share Posted March 26, 2005 (edited) It does seem to have a problem with the $GUI_EVENT_PRIMARYDOWN; my button stops working and I think it doesnt react because the PRIMARYDOWN action overrules the button also. Is there a way to prevent this? -Edit- Code added. expandcollapse popup#include <Constants.au3> #include "GUIConstants.au3" #include <Array.au3> ;Global stuff FileChangeDir(@Scriptdir) #NoTrayIcon ;Vars $HTCAPTION = 2 $WM_NCLBUTTONDOWN = 0xA1 ;The script $pic=GUICreate("", 472, 297, 1024/2-472/2, 768/2-297/2,$WS_POPUP) GUISetState(@SW_SHOW) $gui=GUICtrlCreatePic ("window.gif", 0, 0, 472, 297) GUISetState(@SW_SHOW) GUICtrlSetState($gui, $GUI_DISABLE) $btnx=GUICtrlCreateButton('Hello World',40,40,100,20) GUISetState(@SW_SHOW) func captureit() dllcall("user32.dll","int","ReleaseCapture") dllcall("user32.dll","int","SendMessage","hWnd", $pic,"int",$WM_NCLBUTTONDOWN,"int", $HTCAPTION,"int", 0) EndFunc Do $msg = GUIGetMsg(1) Select Case $msg[0]= $GUI_EVENT_PRIMARYDOWN captureit() Case $msg[0]= $btnx MsgBox(0,"Button click", "Clicked on btnx") Case $msg[0]= $GUI_EVENT_CLOSE MsgBox(0,"Close", "Closing window.") Exit EndSelect Until $msg = $GUI_EVENT_CLOSE Edited March 26, 2005 by FrashMX Link to comment Share on other sites More sharing options...
layer Posted March 26, 2005 Share Posted March 26, 2005 also, GUIGetCursorInfo will tell you if the primary or secondary mouse button is up, or down... just thought id let yall know FootbaG Link to comment Share on other sites More sharing options...
eJan Posted March 26, 2005 Share Posted March 26, 2005 (edited) Try this one: <= removedPlease upload Your script with images.Edit: GUISetOnEventOnEvent functions are only called when the option GUIOnEventMode is set to 1 - when in this mode GUIGetMsg is NOT used at all.... GUICtrlSetState, I think that the buttons can't work constantly.EDIT: Added new script with button functionality Transparent_GUI.rar Edited April 2, 2005 by eJan 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