CODE
Form1
Dim s As String
Private Sub color_Click()
CommonDialog1.ShowColor
rtb1.SelColor = CommonDialog1.color
End Sub
Private Sub copy_Click()
s = rtb1.SelText
End Sub
Private Sub cut_Click()
s = rtb1.SelText
rtb1.SelText = ""
End Sub
Private Sub edit_Click(Index As Integer)
If (rtb1.SelLength = 0) Then
copy.Enabled = False
cut.Enabled = False
Else
copy.Enabled = True
cut.Enabled = True
End If
If Clipboard.GetText = "" Then
paste.Enabled = False
Else
paste.Enabled = True
End If
End Sub
Private Sub exit_Click()
End
End Sub
Private Sub font_Click()
CommonDialog1.ShowFont
rtb1.SelFontName = CommonDialog1.FontName
rtb1.SelBold = CommonDialog1.FontBold
rtb1.SelItalic = CommonDialog1.FontItalic
rtb1.SelUnderline = CommonDialog1.FontUnderline
rtb1.SelStrikeThru = CommonDialog1.FontStrikethru
rtb1.SelFontSize = CommonDialog1.FontSize
End Sub
Private Sub mnunew_Click()
rtb1 = ""
End Sub
Private Sub open_Click()
CommonDialog1.ShowOpen
rtb1.LoadFile (CommonDialog1.FileName)
End Sub
Private Sub paste_Click()
rtb1.Text = rtb1.Text & s
End Sub
Private Sub save_Click()
CommonDialog1.ShowSave
rtb1.SaveFile (CommonDialog1.FileName)
End Sub
Monday, June 14, 2010
MENU EDITOR
AIM:To create a menu editor
0 comments:
Post a Comment