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

نسخة كاملة : اخذ سكرين فقط للفورم
أنت حالياً تتصفح نسخة خفيفة من المنتدى . مشاهدة نسخة كاملة مع جميع الأشكال الجمالية .
السلام عليكم
لدي كود لاخذ سكرين للفورم بس بيبقا فيه فيديو شغال الشاشة بتبقا سوداء فانا عاوز اخد سكرين للفورم والفيديو اللى شغال يظهر
ده الكود
كود :
 Dim bmp As New Bitmap(Me.Width, Me.Height)
     Me.DrawToBitmap(bmp, New Rectangle(0, 0, Me.Width, Me.Height))
     bmp.Save(My.Computer.FileSystem.SpecialDirectories.Desktop & "\" & Me.Text & ".png", Imaging.ImageFormat.Png)
(07-11-20, 10:00 PM)ميدو الفنان كتب : [ -> ]السلام عليكم
لدي كود لاخذ سكرين للفورم بس بيبقا فيه فيديو شغال الشاشة بتبقا سوداء فانا عاوز اخد سكرين للفورم والفيديو اللى شغال يظهر
ده الكود
كود :
 Dim bmp As New Bitmap(Me.Width, Me.Height)
     Me.DrawToBitmap(bmp, New Rectangle(0, 0, Me.Width, Me.Height))
     bmp.Save(My.Computer.FileSystem.SpecialDirectories.Desktop & "\" & Me.Text & ".png", Imaging.ImageFormat.Png)

و عليكم السلام

كود :
   Private Function CreateScreenshot(ByVal Control As Control) As Bitmap
       Dim Screenshot As New Bitmap(Control.Width, Control.Height)
       Control.DrawToBitmap(Screenshot, New Rectangle(0, 0, Control.Width, Control.Height))
       Return Screenshot
   End Function

   Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
       Dim Capt As Bitmap
       Capt = CreateScreenshot(Me)
       Capt.Save("E:\trakktour.png", System.Drawing.Imaging.ImageFormat.Png)
       MsgBox("Saved Images")
   End Sub
وعليكم السلام
حدد العنصر 

PHP كود :
       Dim w As Integer Panel1.Width
        Dim h 
As Integer Panel1.Height
        Dim bmp 
As New Bitmap(wh)
 
       Dim g As Graphics Graphics.FromImage(bmp)
 
       Dim n As New Point(00)
 
       Dim s As New Size(bmp.Widthbmp.Height)
 
       g.CopyFromScreen(Panel1.PointToScreen(n), ns)
 
       bmp.Save(pSystem.Drawing.Imaging.ImageFormat.Png
المتغير p مسار الصورة العنصر اللذي يتم تصويره panel1 انت ضع بدلا عنها wmp  هذا حل حتى تجد حل افضل يعني يكون التصوير لـwmp
(07-11-20, 11:33 PM)trakktour كتب : [ -> ]
(07-11-20, 10:00 PM)ميدو الفنان كتب : [ -> ]السلام عليكم
لدي كود لاخذ سكرين للفورم بس بيبقا فيه فيديو شغال الشاشة بتبقا سوداء فانا عاوز اخد سكرين للفورم والفيديو اللى شغال يظهر
ده الكود
كود :
 Dim bmp As New Bitmap(Me.Width, Me.Height)
     Me.DrawToBitmap(bmp, New Rectangle(0, 0, Me.Width, Me.Height))
     bmp.Save(My.Computer.FileSystem.SpecialDirectories.Desktop & "\" & Me.Text & ".png", Imaging.ImageFormat.Png)

و عليكم السلام

كود :
   Private Function CreateScreenshot(ByVal Control As Control) As Bitmap
       Dim Screenshot As New Bitmap(Control.Width, Control.Height)
       Control.DrawToBitmap(Screenshot, New Rectangle(0, 0, Control.Width, Control.Height))
       Return Screenshot
   End Function

   Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
       Dim Capt As Bitmap
       Capt = CreateScreenshot(Me)
       Capt.Save("E:\trakktour.png", System.Drawing.Imaging.ImageFormat.Png)
       MsgBox("Saved Images")
   End Sub

للاسف مشغل vlc لا يظهر وتظهر شاشة سوداء
(07-11-20, 11:38 PM)ميدو الفنان كتب : [ -> ]
(07-11-20, 11:33 PM)trakktour كتب : [ -> ]
(07-11-20, 10:00 PM)ميدو الفنان كتب : [ -> ]السلام عليكم
لدي كود لاخذ سكرين للفورم بس بيبقا فيه فيديو شغال الشاشة بتبقا سوداء فانا عاوز اخد سكرين للفورم والفيديو اللى شغال يظهر
ده الكود
كود :
 Dim bmp As New Bitmap(Me.Width, Me.Height)
     Me.DrawToBitmap(bmp, New Rectangle(0, 0, Me.Width, Me.Height))
     bmp.Save(My.Computer.FileSystem.SpecialDirectories.Desktop & "\" & Me.Text & ".png", Imaging.ImageFormat.Png)

و عليكم السلام

كود :
   Private Function CreateScreenshot(ByVal Control As Control) As Bitmap
       Dim Screenshot As New Bitmap(Control.Width, Control.Height)
       Control.DrawToBitmap(Screenshot, New Rectangle(0, 0, Control.Width, Control.Height))
       Return Screenshot
   End Function

   Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
       Dim Capt As Bitmap
       Capt = CreateScreenshot(Me)
       Capt.Save("E:\trakktour.png", System.Drawing.Imaging.ImageFormat.Png)
       MsgBox("Saved Images")
   End Sub

للاسف مشغل vlc لا يظهر وتظهر شاشة سوداء
تفضل 
جربت الكود و شغال 

كود :
       Dim graphic As Graphics = Nothing
       Dim location As Point = Me.Bounds.Location
       Dim width As Integer = Me.Bounds.Width + 8
       Dim bounds As Rectangle = Me.Bounds
       Dim bitmap As System.Drawing.Bitmap = New System.Drawing.Bitmap(width, bounds.Height + 8)
       graphic = Graphics.FromImage(bitmap)
       Dim x As Integer = location.X
       Dim y As Integer = location.Y
       graphic.CopyFromScreen(x - 5, y - 5, 0, 0, bitmap.Size)
       bitmap.Save("E:\trakktour.png", Imaging.ImageFormat.Jpeg)
       MsgBox("Saved Images")
(07-11-20, 11:53 PM)trakktour كتب : [ -> ]
(07-11-20, 11:38 PM)ميدو الفنان كتب : [ -> ]
(07-11-20, 11:33 PM)trakktour كتب : [ -> ]
(07-11-20, 10:00 PM)ميدو الفنان كتب : [ -> ]السلام عليكم
لدي كود لاخذ سكرين للفورم بس بيبقا فيه فيديو شغال الشاشة بتبقا سوداء فانا عاوز اخد سكرين للفورم والفيديو اللى شغال يظهر
ده الكود
كود :
 Dim bmp As New Bitmap(Me.Width, Me.Height)
     Me.DrawToBitmap(bmp, New Rectangle(0, 0, Me.Width, Me.Height))
     bmp.Save(My.Computer.FileSystem.SpecialDirectories.Desktop & "\" & Me.Text & ".png", Imaging.ImageFormat.Png)

و عليكم السلام

كود :
   Private Function CreateScreenshot(ByVal Control As Control) As Bitmap
       Dim Screenshot As New Bitmap(Control.Width, Control.Height)
       Control.DrawToBitmap(Screenshot, New Rectangle(0, 0, Control.Width, Control.Height))
       Return Screenshot
   End Function

   Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
       Dim Capt As Bitmap
       Capt = CreateScreenshot(Me)
       Capt.Save("E:\trakktour.png", System.Drawing.Imaging.ImageFormat.Png)
       MsgBox("Saved Images")
   End Sub

للاسف مشغل vlc لا يظهر وتظهر شاشة سوداء
تفضل 
جربت الكود و شغال 

كود :
       Dim graphic As Graphics = Nothing
       Dim location As Point = Me.Bounds.Location
       Dim width As Integer = Me.Bounds.Width + 8
       Dim bounds As Rectangle = Me.Bounds
       Dim bitmap As System.Drawing.Bitmap = New System.Drawing.Bitmap(width, bounds.Height + 8)
       graphic = Graphics.FromImage(bitmap)
       Dim x As Integer = location.X
       Dim y As Integer = location.Y
       graphic.CopyFromScreen(x - 5, y - 5, 0, 0, bitmap.Size)
       bitmap.Save("E:\trakktour.png", Imaging.ImageFormat.Jpeg)
       MsgBox("Saved Images")

شكرا لك جدا والله انك مبدع