帮忙讲一下 FindText、 ReplaceText

dsclub 2001-12-02 09:51:31
Private Type FINDREPLACE
lStructSize As Long
hwndOwner As Long
hInstance As Long
flags As Long
lpstrFindWhat As String
lpstrReplaceWith As String
wFindWhatLen As Integer
wReplaceWithLen As Integer
lCustData As Long
lpfnHook As Long
lpTemplateName As String
End Type
Private Declare Function FindText Lib "comdlg32.dll" Alias "FindTextA" _
(pFindreplace As FINDREPLACE) As Long

Private Declare Function ReplaceText Lib "comdlg32.dll" Alias "ReplaceTextA" _
(pFindreplace As FINDREPLACE) As Long

Dim frText As FINDREPLACE

private sub form_load()
With frText
.lpstrReplaceWith = "Replace Text"
.lpstrFindWhat = "Find Text"
.wFindWhatLen = 9
.wReplaceWithLen = 12
.hInstance = App.hInstance
.hwndOwner = Me.hwnd
.lStructSize = LenB(frText)
End With
end sub
'窗体上有个richTextbox


Private Sub mnuFind_Click()
Call FindText(frText)


End Sub

Private Sub mnuReplace_Click()
Call ReplaceText(frText)
End Sub

可是并没反映??
有时还死机!!
帮忙吧

...全文
103 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
lwef 2002-01-10
  • 打赏
  • 举报
回复
我也想知道
dsclub 2002-01-10
  • 打赏
  • 举报
回复
lwef(寒枫) :
去这个吧:
http://www.csdn.net/expert/topic/401/401830.shtm
dsclub 2001-12-02
  • 打赏
  • 举报
回复
真的没人关注!!
悲哀!!
给个面子
dsclub 2001-12-02
  • 打赏
  • 举报
回复
拜托了!!!
dsclub 2001-12-02
  • 打赏
  • 举报
回复
有空的帮忙顶一下!
gmc007 2001-12-02
  • 打赏
  • 举报
回复
帮我看看
http://www.csdn.net/expert/topic/399/399534.shtm

7,763

社区成员

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

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