CSS for grabbing cursors (drag & drop)

In case anyone else stumbles across this question, this is probably what you were looking for: .grabbable { cursor: move; /* fallback if grab cursor is unsupported */ cursor: grab; cursor: -moz-grab; cursor: -webkit-grab; } /* (Optional) Apply a “closed-hand” cursor during drag operation. */ .grabbable:active { cursor: grabbing; cursor: -moz-grabbing; cursor: -webkit-grabbing; }

How to hide cursor in a Swing application?

It appears that the Cursor class does not have a “blank” cursor to begin with, so one could define a new “blank” cursor using the Toolkit.createCustomCursor method. Here’s one way I’ve tried which seems to work: // Transparent 16 x 16 pixel cursor image. BufferedImage cursorImg = new BufferedImage(16, 16, BufferedImage.TYPE_INT_ARGB); // Create a new … Read more

Custom Cursor Image CSS

Your problem may be that cursor URLs don’t work in Firefox for the Mac. You can get the same effect on Firefox by using the -moz-zoom-in keyword. cursor:url(/img/magnify.cur), -moz-zoom-in, auto; This will show magnify.cur, the Mozilla-specific zoom cursor or a system default cursor. The first cursor on the list that the browser supports is used. … Read more

How can I make the cursor turn to the wait cursor?

You can use Cursor.Current. // Set cursor as hourglass Cursor.Current = Cursors.WaitCursor; // Execute your time-intensive hashing code here… // Set cursor as default arrow Cursor.Current = Cursors.Default; However, if the hashing operation is really lengthy (MSDN defines this as more than 2-7 seconds), you should probably use a visual feedback indicator other than the … Read more

Cursor.Current vs. this.Cursor

Windows sends the window that contains the mouse cursor the WM_SETCURSOR message, giving it an opportunity to change the cursor shape. A control like TextBox takes advantage of that, changing the cursor into a I-bar. The Control.Cursor property determines what shape will be used. The Cursor.Current property changes the shape directly, without waiting for a … Read more

How to move mouse cursor using C#?

Take a look at the Cursor.Position Property. It should get you started. private void MoveCursor() { // Set the Current cursor, move the cursor’s Position, // and set its clipping rectangle to the form. this.Cursor = new Cursor(Cursor.Current.Handle); Cursor.Position = new Point(Cursor.Position.X – 50, Cursor.Position.Y – 50); Cursor.Clip = new Rectangle(this.Location, this.Size); }