On Fri, Jul 25, 2008 at 4:13 PM, Tim Roberts <[EMAIL PROTECTED]> wrote:

> Brian Parma wrote:
>
>> Is this function working?  When I try it using a default cursor
>> (IDC_WAIT), the cursor changes only if the mouse is over the window, and
>> even then if I move the mouse at all it reverts back immediately.
>> I googled this problem a bit and only found one mailing list post on this
>> problem, but there was no solution posted, is this a bug?
>>
>
> The first part of your question is just the way Windows is designed.  YOUR
> application is busy, but other applications are just fine.  Why should your
> cursor choice be foisted upon other applications?
>
> As to the "reverts back immediately", do you have a runnable sample that
> shows this?
>
> --
> Tim Roberts, [EMAIL PROTECTED]
> Providenza & Boekelheide, Inc.
>
> _______________________________________________
> python-win32 mailing list
> python-win32@python.org
> http://mail.python.org/mailman/listinfo/python-win32
>

I was under the impression that SetCursor sets the mouse cursor
'system-wide', not just for your window.  At least that's how it seems to
work in this C++ example:


For the second part, this example produces it.  It uses PyQt4, could that be
causing the problem?  It changes the Icon on any key press when the window
has focus.

import win32con as w32c
import win32gui as w32g
from PyQt4 import QtGui, QtCore
import pyHook, sys

class WindowFinder(QtGui.QWidget):
    def __init__(self, parent=None, icon=None):
        QtGui.QWidget.__init__(self, parent)
        self.resize(200,200)

    def keyPressEvent(self, event):
        print 'set'
        hC = w32g.LoadCursor(0,w32c.IDC_WAIT)
        print w32g.SetCursor(hC)


if __name__ == '__main__':
    app = QtGui.QApplication(sys.argv)
    wf = WindowFinder()
    wf.show()
    app.exec_()
_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to