اذا كانت الصوره معروضه في PictureBox وهي اصلا موجوده في الجهاز يكفي استخدام الكود Process.Start(filename) مع وضع مسار الصوره في filename واذا كانت غير ذلك فهذا هو الكود
PHP كود :
Private Sub PictureBox1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles PictureBox1.Click If PictureBox1.Image IsNot Nothing Then Dim p As String = IO.Path.GetTempFileName & ".png" PictureBox1.Image.Save(p, Imaging.ImageFormat.Png) Process.Start(p) End If End Sub
25-10-24, 11:18 AM (آخر تعديل لهذه المشاركة : 25-10-24, 11:21 AM {2} بواسطة أبو خالد الشكري.)
مرحبا أخي العزيز جرب الكود التالي :
كود :
If PictureBox1.Image IsNot Nothing Then
Dim tempFilePath As String = System.IO.Path.Combine(System.IO.Path.GetTempPath(), "tempImage.png")
PictureBox1.Image.Save(tempFilePath, System.Drawing.Imaging.ImageFormat.Png)
Process.Start(tempFilePath)
End If
If PictureBox1.Image IsNot Nothing Then
Dim tempFilePath As String = System.IO.Path.Combine(System.IO.Path.GetTempPath(), "tempImage.png")
Using tempImage As New Bitmap(PictureBox1.Image)
tempImage.Save(tempFilePath, System.Drawing.Imaging.ImageFormat.Png)
End Using
Process.Start(tempFilePath)
End If