找回密码
 立即注册

QQ登录

只需一步,快速开始

AVRANK

中级会员

20

主题

33

帖子

513

积分

中级会员

积分
513

活字格认证

AVRANK
中级会员   /  发表于:2011-6-17 11:33  /   查看:7737  /  回复:2
SPread 如何实现鼠标右击选中单元格?我加了代码右击出现快捷菜单,但是单元格不跟着变。VB6.0和SPREAD8.0

Private Sub fpSpread1_RightClick(ByVal ClickType As Integer, ByVal Col As Long, ByVal Row As Long, ByVal MouseX As Long, ByVal MouseY As Long)
   PopupMenu mnuFile
End Sub

2 个回复

倒序浏览
ZenosZeng讲师达人认证 悬赏达人认证
超级版主   /  发表于:2011-6-17 13:53:00
沙发
我添加了以下菜单和代码可以正常显示右键菜单
  1. Private Sub A_Click(Index As Integer)
  2.     fpSpread1.SetText fpSpread1.ActiveCol, fpSpread1.ActiveRow, "A"
  3. End Sub

  4. Private Sub B_Click()
  5.     fpSpread1.SetText fpSpread1.ActiveCol, fpSpread1.ActiveRow, "B"
  6. End Sub

  7. Private Sub C_Click()
  8.     fpSpread1.SetText fpSpread1.ActiveCol, fpSpread1.ActiveRow, "C"
  9. End Sub

  10. Private Sub fpSpread1_RightClick(ByVal ClickType As Integer, ByVal Col As Long, ByVal Row As Long, ByVal MouseX As Long, ByVal MouseY As Long)
  11.     PopupMenu mnuFile
  12. End Sub
复制代码
代码.png (109.83 KB, 下载次数: 281)
回复 使用道具 举报
ZenosZeng讲师达人认证 悬赏达人认证
超级版主   /  发表于:2011-6-17 14:01:00
板凳
显示菜单.png (18.18 KB, 下载次数: 270)
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部