MoveMouse.htm 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <html>
  2. <head>
  3. <title>Blitz3D Docs</title>
  4. <link rel=stylesheet href=../css/commands.css type=text/css>
  5. </head>
  6. <body>
  7. <h1>MoveMouse x,y</h1>
  8. <h1>Parameters</h1>
  9. <table>
  10. <tr>
  11. <td>
  12. x = the x coordinate on the screen to move the mouse <br />
  13. y = the y coordinate on the screen to move the mouse
  14. </td>
  15. </tr>
  16. </table>
  17. <h1>Description</h1>
  18. <table>
  19. <tr>
  20. <td>
  21. Although the mouse isn't visible on the screen, the mouse location is still being tracked and you can attach a graphic to it. However, there are times when you want to put the pointer to a specific location on the screen. Use this command to move the mouse to a designated location.
  22. </td>
  23. </tr>
  24. </table>
  25. <h1><a href=../2d_examples/MoveMouse.bb>Example</a></h1>
  26. <table>
  27. <tr>
  28. <td>
  29. Graphics 640,480 <br />
  30. <br />
  31. SetBuffer BackBuffer() <br />
  32. <br />
  33. Repeat <br />
  34. Cls <br />
  35. <br />
  36. Text 320,0,"Click to reset mouse",True <br />
  37. <br />
  38. Text 0,0,"Mouse X:"+MouseX() <br />
  39. Text 0,10,"Mouse Y:"+MouseY() <br />
  40. <br />
  41. If MouseDown(1) Or MouseDown(2) Then MoveMouse 320,240 <br />
  42. <br />
  43. Text MouseX(),MouseY(),"X",True,True <br />
  44. <br />
  45. Flip <br />
  46. <br />
  47. Until KeyHit(1) <br />
  48. <br />
  49. End
  50. </td>
  51. </tr>
  52. </table>
  53. <br>
  54. <a target=_top href=../index.htm>Index</a><br>
  55. <br>
  56. Click <a href=http://www.blitzbasic.co.nz/b3ddocs/command.php?name=MoveMouse&ref=comments target=_blank>here</a> to view the latest version of this page online</body>
  57. </html>