Sub Button1_Click
Dim formm, scene, cursor As JavaObject
formm = MainForm
scene = formm.GetField("scene")
Log(scene.RunMethod("getCursor", Null))
cursor.InitializeStatic("javafx.scene.Cursor")
scene.RunMethod("setCursor", Array(cursor.GetField("CLOSED_HAND")))
Log(scene.RunMethod("getCursor", Null))
End Sub
B4J UI is implemented with JavaFX not AWT so you can't. You could try the code below. If you don't explicitly set the cursor to a JavaFX one it appears to return Null. I'm not very well acquainted with JavaFX but it seems to work.
Cursor types are hereB4X:Sub Button1_Click Dim formm, scene, cursor As JavaObject formm = MainForm scene = formm.GetField("scene") Log(scene.RunMethod("getCursor", Null)) cursor.InitializeStatic("javafx.scene.Cursor") scene.RunMethod("setCursor", Array(cursor.GetField("CLOSED_HAND"))) Log(scene.RunMethod("getCursor", Null)) End Sub
From a different app - get active window - mouse cursor ? ??I don't think you can. In JavaFX/B4J the cursor belongs to a form.
Well I need it for an app: remote administration... .when capturing screen not getting mousepointer... so need to know type of mousepointer i have in remote... to set it at my client window...Why do you need to? You would need to poke around inside Windows itself to do such things.