منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب

نسخة كاملة : screen capture
أنت حالياً تتصفح نسخة خفيفة من المنتدى . مشاهدة نسخة كاملة مع جميع الأشكال الجمالية .
هل يمتلك احد مثال او طريقة صنع screen capture بى تحديد الصوره Custom Area
كود :
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim bound As Rectangle
        Dim screenshot As Bitmap
        Dim gravic As Graphics
        bound = Screen.PrimaryScreen.Bounds
        screenshot = New Bitmap(bound.Width, bound.Height, System.Drawing.Imaging.PixelFormat.Format24bppRgb)
        gravic = Graphics.FromImage(screenshot)
        gravic.CopyFromScreen(bound.X, bound.Y, 0, 0, bound.Size, CopyPixelOperation.SourceCopy)
        PictureBox1.Image = screenshot
    End Sub
SaLoOoMX كتب :
كود :
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim bound As Rectangle
        Dim screenshot As Bitmap
        Dim gravic As Graphics
        bound = Screen.PrimaryScreen.Bounds
        screenshot = New Bitmap(bound.Width, bound.Height, System.Drawing.Imaging.PixelFormat.Format24bppRgb)
        gravic = Graphics.FromImage(screenshot)
        gravic.CopyFromScreen(bound.X, bound.Y, 0, 0, bound.Size, CopyPixelOperation.SourceCopy)
        PictureBox1.Image = screenshot
    End Sub
شكرآ اخى لاكن الذى اقصده هو تصوير جزء من الشاشه فقط
نحمده ونصلي على رسوله الكريم

هذا مثال من المنتدى القديم للاخ عمر silverlight
الفكرة ممتــــــــازة
حاولت معاها وشبه مشى الحال تقريبا لكن عايز ضبط وترتيب الأمور اكثر
أنقر بزر الفأرة الأيمن فقط

SaLoOoMX كتب :
كود :
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim bound As Rectangle
        Dim screenshot As Bitmap
        Dim gravic As Graphics
        bound = Screen.PrimaryScreen.Bounds
        screenshot = New Bitmap(bound.Width, bound.Height, System.Drawing.Imaging.PixelFormat.Format24bppRgb)
        gravic = Graphics.FromImage(screenshot)
        gravic.CopyFromScreen(bound.X, bound.Y, 0, 0, bound.Size, CopyPixelOperation.SourceCopy)
        PictureBox1.Image = screenshot
    End Sub

DreamsDotNet كتب :نحمده ونصلي على رسوله الكريم

هذا مثال من المنتدى القديم للاخ عمر silverlight

Abu Ehab كتب : الفكرة ممتــــــــازة
حاولت معاها وشبه مشى الحال تقريبا لكن عايز ضبط وترتيب الأمور اكثر
أنقر بزر الفأرة الأيمن فقط

شكرآ جيزيلآ اخوتى انا امتلك كود ها هو
كود :
Public Class Form1
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If Not Form2.Visible Then : Form2.Show() : Exit Sub : End If
        PictureBox1.Image = getSnapshot(Form2)
    End Sub
    Private Function getSnapshot(ByVal snapshotForm As Form) As Bitmap
        With snapshotForm
            .FormBorderStyle = Windows.Forms.FormBorderStyle.None
            Dim bmp As New Bitmap(.Width + 15, .Height + 25, Imaging.PixelFormat.Format32bppArgb)
            Dim g As Graphics = Graphics.FromImage(bmp)
            g.CopyFromScreen(New Point(.Location.X, .Location.Y), New Point(0, 0), bmp.Size)
            .FormBorderStyle = Windows.Forms.FormBorderStyle.Sizable
            Return bmp
        End With
    End Function
End Class
Public Class Form2
    Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.TransparencyKey = Me.BackColor : Me.TopMost = True : Me.MinimizeBox = False : Me.MaximizeBox = False
        Me.Text = "Snapshot View" : Me.Icon = SystemIcons.Information : Me.ShowInTaskbar = False
    End Sub
End Class
لائفاده
[تم الحل بفضل الله]