After hours of searching google, with little luck, I'm wondering if anybody
knows how to either hide the cursor, or set a custom cursor (which could be
made blank) in Windows when dragging and dropping.
I'm writing a program which draws its own mouse using openGL, and normally the
mouse hides just fine, but when I drag files onto the program's window, the
windows cursor shows the drag-and-drop square and will not hide.
ShowCursor(False) and SetCursor(None) (in python) are inconsistent for hiding
the cursor.
Ideally, if anybody knew how to do this in Python using pywin32, that would be
ideal, as that's the language my project is using, but if I have to code this
up in another language I will.
Alternately, if anybody knows when ShowCursor and SetCursor will guarantee to
hide the cursor, whether this has to do with window focus or something related,
that would also be helpful. I've tried the following:
while ShowCursor(False) > -1:
pass
This code works sometimes, and I can't figure out reliable when it does. It
doesn't seem to have to do with window focus. It works sometimes when I drag a
file from a folder, and never when I drag a file from the desktop. It also
never hides the cursor the first time I drag a file.
I've found this page:
http://msdn.microsoft.com/en-us/library/system.windows.forms.control.dodragdrop.aspx#Y1354
I cannot get the C++ code to compile, and I get exceptions when I use the C#
and VB versions. I've copied cursors from C:\Windows\Cursors to the directory
with the executable as 3dwarro.cur and 3dwno.cur. When I comment out the try
clauses, when it tries to load the cursors it says they are corrupt.
I've also found this page:
http://www.rockhoppertech.com/java-drag-and-drop-faq.html. It says to set the
DragContext's cursor to null and then to your cursor in dragOver. The page is
in Java, and I don't know how to do what it is saying.
Many thanks in advance!
_______________________________________________
python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32