26-12-16, 06:29 PM
الأخ علي
الكود سيكون شيئا من هذا القبيل
الكود سيكون شيئا من هذا القبيل
PHP كود :
Dim rect As Rectangle = Screen.PrimaryScreen.Bounds
Dim bmp As Bitmap = Image.FromHbitmap(New Bitmap(rect.Width, rect.Size.Height).GetHbitmap(), Graphics.FromHwnd(IntPtr.Zero).GetHdc())
Try
Dim g As Graphics = Graphics.FromImage(bmp)
Try
g.CopyFromScreen(rect.Location, rect.Location, rect.Size, CopyPixelOperation.SourceCopy)
bmp.Save((".\" & DateTime.Now.ToFileTimeUtc & ".jpg"), Imaging.ImageFormat.Jpeg)
Catch ex As Exception
Finally
If g IsNot Nothing Then
g.Dispose()
g = Nothing
End If
End Try
Catch ex As Exception
Finally
If bmp IsNot Nothing Then
bmp.Dispose()
bmp = Nothing
End If
End Try

