(28-10-19, 11:07 PM)3booody كتب : تفضل اخي هذه محاولتي
كود :
Dim screenshot As System.Drawing.Bitmap
Dim bit As New List(Of Bitmap)
Dim graph As Graphics
Dim frame As Integer = 0
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Bounds = Screen.PrimaryScreen.Bounds
screenshot = New System.Drawing.Bitmap(Bounds.Width, Bounds.Height, System.Drawing.Imaging.PixelFormat.Format32bppArgb)
graph = Graphics.FromImage(screenshot)
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If frame = 60 Then
Timer1.Stop()
Return
End If
graph.CopyFromScreen(Bounds.X, Bounds.Y, 0, 0, Bounds.Size, CopyPixelOperation.SourceCopy)
bit.Add(screenshot)
frame += 1
Label1.Text = frame
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Timer1.Enabled = True
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim n As Integer = 0
For Each img As Bitmap In bit
img.Save("C:\Users\3bo0ody\Desktop\ima\ima" & n & ".jpg", System.Drawing.Imaging.ImageFormat.Jpeg)
n += 1
Next
End Sub
الان سأشاهد النتيجة

(28-10-19, 11:07 PM)3booody كتب : تفضل اخي هذه محاولتي
كود :
Dim screenshot As System.Drawing.Bitmap
Dim bit As New List(Of Bitmap)
Dim graph As Graphics
Dim frame As Integer = 0
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Bounds = Screen.PrimaryScreen.Bounds
screenshot = New System.Drawing.Bitmap(Bounds.Width, Bounds.Height, System.Drawing.Imaging.PixelFormat.Format32bppArgb)
graph = Graphics.FromImage(screenshot)
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If frame = 60 Then
Timer1.Stop()
Return
End If
graph.CopyFromScreen(Bounds.X, Bounds.Y, 0, 0, Bounds.Size, CopyPixelOperation.SourceCopy)
bit.Add(screenshot)
frame += 1
Label1.Text = frame
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Timer1.Enabled = True
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim n As Integer = 0
For Each img As Bitmap In bit
img.Save("C:\Users\3bo0ody\Desktop\ima\ima" & n & ".jpg", System.Drawing.Imaging.ImageFormat.Jpeg)
n += 1
Next
End Sub
لقد قام بتكرار نفس الصورة 60 مرة
انا اعتقد انه يوجد امل
هل من حل ؟
