25-03-13, 02:53 PM
لم أتطرق قط في التعامل مع هذي الأداة ولاكن من خلال بحثي وجت طريقه إضافة صوره داخل الأداة
لا أدري هي ستفيد بالغرض ام لا
هذا الكود
لا أدري هي ستفيد بالغرض ام لا
هذا الكود
PHP كود :
Dim OpenFileDialog1 As New OpenFileDialog
OpenFileDialog1.Title = "إدراج صورة"
OpenFileDialog1.DefaultExt = "rtf"
OpenFileDialog1.Filter = "Bitmap Files|*.bmp|JPEG Files|*.jpg|GIF Files|*.gif"
OpenFileDialog1.FilterIndex = 1
OpenFileDialog1.ShowDialog()
If OpenFileDialog1.FileName = "" Then Exit Sub
Try
Dim strImagePath As String = OpenFileDialog1.FileName
Dim img As Image
img = Image.FromFile(strImagePath)
Clipboard.SetDataObject(img)
Dim df As DataFormats.Format
df = DataFormats.GetFormat(DataFormats.Bitmap)
If Me.RichTextBox1.CanPaste(df) Then
Me.RichTextBox1.Paste(df)
End If
Catch ex As Exception
MessageBox.Show("امتداد الصورة غير معروف", "خطأ", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
<---------------------------------------------------------------->

