14-03-13, 08:57 PM
14-03-13, 09:49 PM
كود :
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
14-03-13, 10:12 PM
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
14-03-13, 10:48 PM
15-03-13, 12:38 AM
الفكرة ممتــــــــازة
حاولت معاها وشبه مشى الحال تقريبا لكن عايز ضبط وترتيب الأمور اكثر
أنقر بزر الفأرة الأيمن فقط
حاولت معاها وشبه مشى الحال تقريبا لكن عايز ضبط وترتيب الأمور اكثر
أنقر بزر الفأرة الأيمن فقط
15-03-13, 05:10 AM
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
[تم الحل بفضل الله]