帮我看一下,谢谢 在VB中设计菜单时,全选代码该怎么写?还有查找替换代码?? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 是要做记事本之类的东东吧,看这里:http://www.xker.com/article/articleview/2005-4-15/article_view_831.htm 楼主是什么意思? 你选、菜单要全选的话就这样写 假设对txt操作Private Sub ComSlect_Click() Text1.SetFocus Text1.SelStart = 1 Text1.SelLength = Len(Text1.Text) End Sub替换操作。 s= text1.text replace(s,"Badword") 查找:假设在文本框TEXT1里找STRPrivate Sub subFIND(str as string)dim i as longi=instr(text1,str)if i>0 then Text1.SelStart = i Text1.SelLength = Len(str)elsemsgbox "Not found."end ifEnd Sub 为什么MDIForm子窗体在MDIForm中运行时,子窗体的宽和高都变了? 怎样在VB中实现这样的VB效果? 字符串提取问题 小猫的程序打包问题~~谢谢!!!!新人分少,卖身提问! 如果一个字符变量有若干行,怎样总是获得最后一行? 请教几个跟注册表相关的API函数的意义和使用方法、值返回类型 哪为仁兄知道水晶报表8。0的安装cd key code?? 关于水晶报表打印的问题??? 在VB中怎样使用adsi对程序池进行回收? 在VB程序中如何调用WINDOWS中的打印机设置? 电脑突然掉电了,VB的工程出错,现在要怎么解决呀?急! 怎么样把别的程序上的数据拷贝出来??
http://www.xker.com/article/articleview/2005-4-15/article_view_831.htm
你选、菜单要全选的话就这样写
假设对txt操作
Private Sub ComSlect_Click()
Text1.SetFocus
Text1.SelStart = 1
Text1.SelLength = Len(Text1.Text)
End Sub替换操作。
s= text1.text
replace(s,"Badword")
Private Sub subFIND(str as string)
dim i as long
i=instr(text1,str)
if i>0 then
Text1.SelStart = i
Text1.SelLength = Len(str)
else
msgbox "Not found."
end if
End Sub