تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
طلب بعض الاكواد فى انشاء محرر RichTextBox
#6
السلام عليكم ورحمة الله وبركاته
الحمد لله عرفت اعملها
كود :
Private Sub RichTextBox_rtf_Font_Style(ByVal My_Style As Integer)
        '
        Dim Font_Style As New FontStyle
        Dim Txt_Font As Font = Me.RichTextBox_rtf.SelectionFont
        '
        If Me.RichTextBox_rtf.SelectionFont.Bold And My_Style <> 1 Then Font_Style += FontStyle.Bold
        If Me.RichTextBox_rtf.SelectionFont.Italic And My_Style <> 2 Then Font_Style += FontStyle.Italic
        If Me.RichTextBox_rtf.SelectionFont.Strikeout And My_Style <> 3 Then Font_Style += FontStyle.Strikeout
        If Me.RichTextBox_rtf.SelectionFont.Underline And My_Style <> 4 Then Font_Style += FontStyle.Underline
        '
        Select Case My_Style
            Case 1
                If Not Txt_Font.Bold Then Font_Style += FontStyle.Bold
            Case 2
                If Not Txt_Font.Italic Then Font_Style += FontStyle.Italic
            Case 3
                If Not Txt_Font.Strikeout Then Font_Style += FontStyle.Strikeout
            Case 4
                If Not Txt_Font.Underline Then Font_Style += FontStyle.Underline
        End Select
        '
        Me.RichTextBox_rtf.SelectionFont = New Font(Txt_Font.FontFamily, Txt_Font.Size, Font_Style)
        '
    End Sub

هذا هو الصب
واكواد الازرار

سميك بولد
كود :
RichTextBox_rtf_Font_Style(1)

مائل
كود :
RichTextBox_rtf_Font_Style(2)

تحته خط
كود :
RichTextBox_rtf_Font_Style(4)

وسطه خط
كود :
RichTextBox_rtf_Font_Style(3)

هل يوجد حالات اخرى
الرد }}}
تم الشكر بواسطة:


الردود في هذا الموضوع
طلب بعض الاكواد فى انشاء محرر RichTextBox - بواسطة ali.alfoly - 13-06-13, 08:30 PM


التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم