使用VB程序,设计一个具有复制、剪切、粘贴、保存、字体设置、字型设置、关闭、退出等功能的记事本。很紧急
1109770283@qq.com
谢谢! 展开
我以前做过一个,不过功能有所不同,有菜单和弹出菜单,字体设置,字型设置,颜色等,给你做一下参考。
留下邮箱给你发过去。
源代码:
Private Sub Blue_Click()
Text1.ForeColor = vbBlue
End Sub
Private Sub Form_Load()
Red.Enabled = False
Blue.Enabled = False
Green.Enabled = False
Bld.Checked = False
Itl.Checked = False
Undrln.Checked = False
End Sub
Private Sub Green_Click()
Text1.ForeColor = vbGreen
End Sub
Private Sub bld_click()
Text1.FontBold = Not Text1.FontBold
Bld.Checked = Not Bld.Checked
End Sub
Private Sub Itl_click()
Text1.FontItalic = Not Text1.FontBold
Itl.Checked = Not Itl.Checked
End Sub
Private Sub Undrln_click()
Text1.FontUnderline = Not Text1.FontUnderline
Undrln.Checked = Not Undrln.Checked
End Sub
Private Sub Red_Click()
Text1.ForeColor = vbRed
End Sub
Private Sub Text1_Change()
If Text1 = "" Then
Red.Enabled = False
Blue.Enabled = False
Green.Enabled = False
Else
Red.Enabled = True
Blue.Enabled = True
Green.Enabled = True
End If
End Sub
Private Sub Text1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 2 Then '如果是鼠标右键按下时
Text1.Enabled = False '使文本框无效
Form1.PopupMenu Fon '弹出右键菜单
Text1.Enabled = True '再次使文本框有效
End If
End Sub