Hi, I have a project with multiple windows, in a couple of windows the code inserted in the Event Handler (MouseEnter) no longer works me.MouseCursor = System.Cursors.FingerPointer. Comparing the windows they look the same. How to solve

Which version of Xojo? Which OS? Which version of which OS?

Thank you for your interest It does not work on both windows and mac, so I think it is not related to the version, however I report Windows xojo vers. 2019 3.1 Mac 2020 2.1, on Windows I also tried with version 2021 r3 without success. I have read on the online documentation to check the DesktopApplication class is not on nil, I have no idea where to check

The first thing to check if the mousecursor works for you in a simple example like this here: GitHub - oleman108/imSplitter: Canvas based splitter for Xojo desktop builds .

Can you isolate one of your windows?

Perhaps the issue comes from trying to change the cursor in MouseEnter. You should try the same code in a button. If it works, then move it to a single timer which you trigger from the MouseEnter event.

Maybe I did not say it clear enough; the MousEnter event (me.MouseCursor = System.Cursors.HandOpen) is on some labels that report values, and on the MouseEnter (me.MouseCursor = System.Cursors.HandOpen) and MouseDown (me.MouseCursor = System.Cursors) events. HandClosed) of a listbox, in the latter by selecting with the mouse on a line a prohibition icon appears instead of the hand that closes, in all the other windows everything works fine, a few years ago when I developed the project everything worked, I think I have changed something during the various updates. When I develop I do it on windows, debugging is very fast compared to the mac, then I bring it to the mac, this explains why on both I have the same problem on the same windows. I also tried on a button, same problem, while in the other windows ok

If it does not work in a button, looks like something is corrupted on that specific window, since it works on others. Perhaps recreating the window on a brand new window would alleviate the issue.

Add a new window to your project, and try to copy all the controls from the non working one and paste in the new. With some luck, it will fix it.

Michel I tried, unfortunately the same problem arises sich! I will do other tests, if I solve it I will give the solution

Print the project code to pdf (nothing selected in the Navigator pane, then Print and select PDF).

Then compare the code that works in the other(s) window(s) vs the one who do not works.

You probably need to recreate the window’s content. Start with adding one new label on the new window, and see if changing the cursor in MouseEnter works.

Fixed, on the button that opens the window I had entered app.MouseCursor = System.Cursors.wait
this is because the window takes a few seconds to open then at the end of the open event I had inserted app.MouseCursor = System.Cursors.StandardPointer, this did not allow to change the cursor on the MouseEnter event, removed the two codes app.mouseCursor everything ok

1 Like