السلام عليكــم ورحمـة الله وبركاتــه ،،
اريد ان اعرف طريقه حفظ التنسيق للخط
وذلك عند عمليه الأرسال لاكثر من مره
فانا وضعت اداه FontDialog
وهذا الكود
اقتباسDim FontDialog1 As New FontDialogIf Not Me.txtSend.SelectionFont Is Nothing Then
FontDialog1.Font = Me.txtSend.SelectionFont
Else
FontDialog1.Font = Nothing
End If
FontDialog1.ShowApply = True
If FontDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then
Me.txtSend.SelectionFont = FontDialog1.Font
End If
وعند اختيار حجم النص ونوعه يتم التنسيق
وفي حالة الأرسال للمره الأولى ييرسل بنفس التنسيق المختآر
لكن حين اريد ان اكتب مره اخرىآ يكون التنسيق ملغي واختار تنسيق مره اخرى (الحجم النص ونوعه )
علمآ بأن كود الإرسال كالتالي :-
اقتباسDim fontOfcontrol As Font = txtSend.Fonts = Chr(13) & Chr(10)
SendData("Chat|" & txtSend.Text)
With txtReceive
.SelectionColor = .ForeColor
.SelectionFont = .Font
.SelectedText &= MyName & ": " & s
.SelectionFont = txtSend.SelectionFont
.SelectionColor = txtSend.SelectionColor
.ForeColor = txtSend.ForeColor
.SelectionFont = txtSend.SelectionFont
.SelectedText = txtSend.Text & s
.Focus()
.Select(.Text.Length, 0)
.ScrollToCaret()
End With
Me.txtReceive.Focus()
txtSend.Text = ""
شاكرهه لكم تعآونكمُ