07-04-14, 02:31 PM
لإعطاء خيار التحميل من عدمه:
أما لإظهار صورة في RichTextBox فهناك طريقتين
السهلة:
الصعبة:
إيجاد الـFormat المناسب للكلام مع الصورة و وضعه في خاصية Rtf للـRichTextBox
كود :
If listener.Pending Then
If MessageBox.Show("A photo has been sent to you, do you want to recieve it?", "Confirmation", MessageBoxButtons.YesNo) = System.Windows.Forms.DialogResult.Yes Then
Dim mysocket = listener.AcceptSocket
Dim myns = New NetworkStream(mysocket)
PictureBox2.Image = Image.FromStream(myns)
End If
End Ifأما لإظهار صورة في RichTextBox فهناك طريقتين
السهلة:
كود :
My.Computer.Clipboard.SetImage(PictureBox2.Image)
RichTextBox1.Paste(Windows.Forms.DataFormats.GetFormat(System.Windows.Forms.DataFormats.Bitmap))الصعبة:
إيجاد الـFormat المناسب للكلام مع الصورة و وضعه في خاصية Rtf للـRichTextBox

