找了一晚上,也没有结果,太累了, 看这个问题明天是否有人解决?

hcyzs 2001-12-09 10:13:50
本人在richtext控件中调入一篇文章,对照打字,光标在文章某处,鼠标移到该控件下一屏其他地方,点击单词发音,结果光标能跳到原来的地方(上一屏)继续打字,但无法继续点击其他单词发音。或者去掉下列程序倒数三、四行,能继续点击其他单词,但光标无法回到原来的地方继续打字,请问如何解决?
现程序如下:
Private Sub RichText_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbLeftButton And txt <> "" Then
vText.Speak txt, vtxtsp_NORMAL Or vtxtst_STATEMENT
End If
If Button = vbLeftButton Then
Call EnableWindow(RichText.hwnd, 0) '禁用
End If

End Sub

Private Sub RichText_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Call EnableWindow(RichText.hwnd, 1) '打开
With RichText
.SetFocus
.SelStart = Position 'position记录原光标位置
End With
end Sub

...全文
76 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

7,762

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧