correction to above, i still had the Input box set in the stop line, it shoud read
elseif not IsInRect(e_X, e_Y, Hotspot.GetPos("Drag and Drop Area1"), Hotspot.GetSize("Drag and Drop Area1")) and DnD_on == true then
Professional Software Development Tools
correction to above, i still had the Input box set in the stop line, it shoud read
elseif not IsInRect(e_X, e_Y, Hotspot.GetPos("Drag and Drop Area1"), Hotspot.GetSize("Drag and Drop Area1")) and DnD_on == true then
i spoke too soon :( ....it works, right up to the point you move the mouse into the area with the button pressed down, then it fails to trigger (i was testing with a message box in the 2 sections of the code)... but when the mouse button is depressed, the movement into the target area is not detected..... bugger, back to the drawing board
ok, i managed to get my project to become focused and on top of other windows when you drag a file into it's area
the problem was not exactly with my code, but the flakey and unreliable AMS/Windows ontop function/implementation. What i used was the app ontop function of the SendKeys DLL
I placed this in the onstartup and on mouse move sections
and then in the trigger code for the drag and drop, i added the code below, as i did before i utilised the GetEventType function that is checked in the timer section, using it to reset the OnTop variable to true and to call the DLL function, returning the value to false if the item is dragged off the project. Because the on mouse move event does not trigger if you have the mouse button depressed when you enter the project, the code in on mouse move doesnt take affect until you release the mouse buttonCode:OnTop = false;
Code:-- Switch Focus to File Splitter as user drags item to it -- if DragDrop.GetEventType() == "DragOver" and OnTop == false then OnTop = true; -- set ontop flag to true to stop repeat DLL calls SendKeys("{AppActivate File Splitter}") elseif DragDrop.GetEventType() == "DragLeave" then OnTop = false; -- reset ontop flag to false incase user drags item off File Splitter end
Thanks Sooooooo Much!![]()
is there a way to get it to work with both file & text?
(Click here to contact me)
Providing Independent Professional Consulting Services for
IndigoRose products, World Wide.
Located in -8:00 (-7:00 DST) GMT Timezone (Western United States)