以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  请教一下代码如何放入foxtable  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=118984)

--  作者:ljh29206
--  发布时间:2018/5/15 15:16:00
--  请教一下代码如何放入foxtable
\'作用获取当前鼠标位置\'

Private Structure POINTAPI
Dim x As Long
Dim y As Long
End Structure

Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
\'------------全局代码\'


\'--------------命令提示框\'
 Dim z As POINTAPI
GetCursorPos(z)
Output.Show(z.x & z.y)

提示没定义类型

[此贴子已经被作者于2018/5/15 15:21:18编辑过]

--  作者:有点甜
--  发布时间:2018/5/15 15:21:00
--  
Public Structure POINTAPI
Dim X As Long
Dim Y As Long
End  Structure
Public Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long \'移动鼠标

--  作者:ljh29206
--  发布时间:2018/5/15 15:22:00
--  
Dim z As POINTAPI
GetCursorPos(z)
Output.Show(z.x & z.y)

输出结果是 0 , 0 !

我是哪里错了呢
[此贴子已经被作者于2018/5/15 15:26:37编辑过]

--  作者:有点甜
--  发布时间:2018/5/15 15:37:00
--  

获取鼠标值,参考

 

Dim x As Integer = System.Windows.Forms.Cursor.Current.Position.X
Dim y As Integer = System.Windows.Forms.Cursor.Current.Position.Y


--  作者:ljh29206
--  发布时间:2018/5/15 15:49:00
--  
请问


鼠标 隐藏   显示的 代码 是什么呢

--  作者:有点甜
--  发布时间:2018/5/15 15:54:00
--  

<System.Runtime.InteropServices.DllImport("user32.dll", EntryPoint:="ShowCursor")> _
Public Function ShowCursor(ByVal bShow As Boolean) As Boolean
End Function

 

调用

 

ShowCursor(True) \'ShowCursor(False)