13-06-13, 08:30 PM
السلام عليكم ورحمة الله وبركاته
الحمد لله عرفت اعملها
هذا هو الصب
واكواد الازرار
سميك بولد
مائل
تحته خط
وسطه خط
هل يوجد حالات اخرى
الحمد لله عرفت اعملها
كود :
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)هل يوجد حالات اخرى

