谁会用vb程序做的记事本的程序??要内容详细,程序简单的,有的发到我的邮箱,谢谢!!!拜托各位大神

谁会用vb程序做的记事本的程序??要内容详细,程序简单的,有的发到我的邮箱,谢谢!!!pengna343225730@qq.com... 谁会用vb程序做的记事本的程序??要内容详细,程序简单的,有的发到我的邮箱,谢谢!!!pengna343225730@qq.com 展开
 我来答
虎头蟠头9124
2014-06-22 · TA获得超过484个赞
知道答主
回答量:129
采纳率:0%
帮助的人:156万
展开全部
Dim sFind As String Dim FileType, FiType As String Private Sub Form_Load() Me.Height = 6000 Me.Width = 9000 End Sub Private Sub Form_Resize() On Error Resume Next RichTextBox1.Top=20 RichTextBox1.Left=20 RichTextBox1.Height = ScaleHeight-40 RichTextBox1.Width = ScaleWidth-40 End Sub Private Sub mnuNew_Click() RichTextBox1.Text = "" FileName = "未命名" Me.Caption = FileName End Sub Private Sub mnuOpen_Click() CommonDialog1.Filter = "文本文档(*.txt)|*.txt|RTF文档(*.rtf)|*.rtf|所有文件(*.*)|*.*" CommonDialog1.ShowOpen RichTextBox1.Text = "" FileName = CommonDialog1.FileName RichTextBox1.LoadFile FileName Me.Caption = "记事本:" & FileName End Sub Private Sub mnuSave_Click() CommonDialog1.Filter = "文本文山指档(*.txt)|*.txt|RTF文档(*.rtf)|*.rtf|所有文件(*.*)|*.*" CommonDialog1.ShowSave FileType = CommonDialog1.FileTitle FiType = LCase(Right(FileType, 3)) FileName = CommonDialog1.FileName Select Case FiType Case "txt" RichTextBox1.SaveFile FileName, rtfText Case "rtf" RichTextBox1.SaveFile FileName, rtfRTF Case "*.*" RichTextBox1.SaveFile FileName End Select Me.Caption = "超级记事本:" & FileName End Sub Private Sub mnuExit_Click() End End Sub Private Sub mnuCopy_Click() Clipboard.Clear Clipboard.SetText RichTextBox1.SelText End Sub Private Sub mnuCut_Click() Clipboard.Clear Clipboard.SetText RichTextBox1.SelText RichTextBox1.SelText = "" End Sub Private Sub mnuSelectAll_Click() RichTextBox1.SelStart = 0 RichTextBox1.SelLength = Len(RichTextBox1.Text) End Sub Private Sub mnuPaste_Click() RichTextBox1.SelText = Clipboard.GetText End Sub Private Sub mnuFind_Click() sFind = InputBox("请输入要查找的字、词:"逗唯缓, "查找内容山模", sFind) RichTextBox1.Find sFind End Sub Private Sub mnuFindOn_Click() RichTextBox1.SelStart = RichTextBox1.SelStart + RichTextBox1.SelLength + 1 RichTextBox1.Find sFind, , Len(RichTextBox1) End Sub Private Sub mnuReadme_Click() On Error GoTo handler RichTextBox1.LoadFile "Readme.txt", rtfText Me.Caption = "记事本:" & "使用说明" Exit Sub handler: MsgBox "使用说明文档可能已经被移除,请与作者联系。", vbOKOnly, " 错误信息" End Sub '关于 Private Sub mnuAbout_Click() MsgBox " 版权所有 2010 Lseon ",vbOKOnly,"关于" End Sub Private Sub RichTextBox1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) If Button = 2 Then PopupMenu mnuEdit, vbPopupMenuLeftAlign Else Exit Sub End If End Sub Private Sub RichTextBox1_KeyUp(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeySpace Then RichTextBox1.SelFontName = CommonDialog1.FontName End If End Sub
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式