localization with the mouse
junjunz
xmurio at gmail.com
Tue Nov 6 21:46:16 UTC 2012
Hi all,
I'm trying to move a circle (as a cursor) vertically on the screen
with the mouse. That is, move the circle up and down only. This is the code
I used for this:
Dim cnvs As Canvas
Set cnvs = Display.Canvas
cnvs.Clear
cnvs.PenWidth = 5
Mouse.SetCursorPos Display.XRes/2, Display.YRes/2
cnvs.Circle Display.XRes/2, Display.YRes/2, 7
Do While (Mouse.Buttons <> ebMouseButton1)
Display.WaitForVerticalBlank
cnvs.Clear
cnvs.Circle Display.XRes/2, Mouse.CursorY, 7
sleep 20
Loop
The code works. However, when the circle is moved to the upper part of the
screen (close to the edge of the screen), the circle starts to flash. If
'sleep 20' is erased, the circle would be invisible when moved close to the
upper edge of the screen. But it is totally normal if the circle is moved
to the lower part of the screen. I'm wondering why it happens? Is there a
better way to control the circle vertically with the mouse? Thanks so much!
--
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-prime at googlegroups.com.
To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/e-prime/-/Sf-o9_QWq8oJ.
For more options, visit https://groups.google.com/groups/opt_out.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.linguistlist.org/pipermail/eprime/attachments/20121106/8f24351c/attachment.htm>
More information about the Eprime
mailing list