[Gambas-user] Cursor.X, Cursor.Y example

Demosthenes Koptsis demosthenesk at gmail.com
Tue Aug 1 14:43:40 CEST 2023


i had with older versions of Gambas3 the following code working fine...

--------------------------------------------------

' Gambas class file

Public Sub Form_MouseMove()

   Label1.Text = "Mouse X:" & Mouse.X
   Label2.Text = "Mouse Y:" & Mouse.Y

End

--------------------------------------------------


Now for version 3.18.3 i tried the next one


--------------------------------------------------

' Gambas class file

Public Sub Form_MouseMove()

   Label1.Text = "Mouse X:" & Cursor.X
   Label2.Text = "Mouse Y:" & Cursor.Y

End

--------------------------------------------------


But i get error "Cursor.X is not Static"

How must i write the example code

i want to show inside Labels the position of cursor X,Y

Thanks Demosthenes!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20230801/f53872c0/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FMain.class - Project105 0.0.1 ? Gambas 3_001.png
Type: image/png
Size: 89898 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20230801/f53872c0/attachment-0001.png>


More information about the User mailing list