使用VB程序,设计一个具有复制、剪切、粘贴、保存、字体设置、字型设置、关闭、退出等功能的记事本。很紧
2个回答
2013-11-18
展开全部
我以前做过一个,不过功能有所不同,有菜单和弹出菜单,字体设置,字型设置,颜色等,给你做一下参考。<br> 留下邮箱给你发过去。<br> 源代码:<br> Private Sub Blue_Click()<br> Text1.ForeColor = vbBlue<br> End Sub<br> <br>Private Sub Form_Load()<br> Red.Enabled = False<br> Blue.Enabled = False<br> Green.Enabled = False<br> Bld.Checked = False<br> Itl.Checked = False<br> Undrln.Checked = False<br> End Sub<br> <br>Private Sub Green_Click()<br> Text1.ForeColor = vbGreen<br> End Sub<br> Private Sub bld_click()<br> Text1.FontBold = Not Text1.FontBold<br> Bld.Checked = Not Bld.Checked<br> End Sub<br> Private Sub Itl_click()<br> Text1.FontItalic = Not Text1.FontBold<br> Itl.Checked = Not Itl.Checked<br> End Sub<br> Private Sub Undrln_click()<br> Text1.FontUnderline = Not Text1.FontUnderline<br> Undrln.Checked = Not Undrln.Checked<br> End Sub<br> Private Sub Red_Click()<br> Text1.ForeColor = vbRed<br> End Sub<br> <br>Private Sub Text1_Change()<br> If Text1 = "" Then<br> Red.Enabled = False<br> Blue.Enabled = False<br> Green.Enabled = False<br> Else<br> Red.Enabled = True<br> Blue.Enabled = True<br> Green.Enabled = True<br> End If<br> End Sub<br> <br>Private Sub Text1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)<br> If Button = 2 Then '如果是鼠标右键按下时<br> Text1.Enabled = False '使文本框无效<br> Form1.PopupMenu Fon<br> '弹出右键菜单<br> Text1.Enabled = True '再次使文本框有效<br> End If<br> End Sub
2013-11-18
展开全部
飞过海
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询