Rss & SiteMap

金字塔客服中心 - 专业程序化交易软件提供商 http://www.weistock.com/bbs/

专业程序化软件提供商
共7 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:怎么利用MouseDown得到的x轴坐标得到对应k线图上的正序或逆序号

1楼
逸飞 发表于:2016/5/6 15:57:48
我的本意是利用MouseDown事件获得光标所在位置的x轴对应时间。

另外,如何在该事件代码执行过程中判定键盘状态,比如判定点击鼠标的时候ctrl键是否按下。

2楼
jinzhe 发表于:2016/5/6 15:59:36

MouseDown

这个是哪里的函数?

3楼
逸飞 发表于:2016/5/6 16:02:39
Grid事件中的:


Sub mfd_MouseDown(Button, Shift, x, y)
Set Grid = mfd.GetGridByName("Window4")
Set dstGrid = mfd.GetGridByName("Window2")
Application.MsgOut ": " & x & "---" & y

End Sub

这段代码可以正确输出窗格内部x、y坐标。
4楼
jinzhe 发表于:2016/5/6 16:15:00
VBA么?这个需要在高级研发区发帖
5楼
逸飞 发表于:2016/5/6 16:20:59
哦,抱歉发错版块了,我该麻烦管理员移动帖子还是重发呢?谢谢管理员~
6楼
yukizzc 发表于:2016/5/9 9:26:44

dim n
Sub technic_MouseDown(Button, Shift, x, y)
 dim Date
    dim Values
    Set Grid = technic.GetGridByName("main")
    call Grid.ValueByPoint(x, y, Date, Price,True)
    Application.MsgOut ": " & Date & "---" & Price
    application.MsgOut n
End Sub
sub Technic_KeyDown(KeyCode, Shift)
if KeyCode = 17 then
 n=1
 end if
end sub

sub Technic_KeyUp(KeyCode, Shift)
if KeyCode = 17 then
 n=0
 end if
end sub

7楼
逸飞 发表于:2016/5/9 19:56:45
哈哈,这样用变量来传递按键状态很妙,谢谢超版!
共7 条记录, 每页显示 10 条, 页签: [1]


Powered By Dvbbs Version 8.3.0
Processed in 0.04297 s, 2 queries.