:
ByteScout tutorials explain the material for programmers who use VB.NET. ByteScout Screen Capturing SDK was made to help with take screenshots during recording in VB.NET. ByteScout Screen Capturing SDK is the SDK for developers for quick implementation of screen video recording. The SDK records screen into video or into a series of screenshots. Can also record audio. Saves video into AVI,WMV and Google’s WebM. Output video quality, size, resolution or framerate can be adjusted easily. Provides additional tools for privacy features like blacking out on scren areas with sensitive information on screen right during recording. Supports web camera as input and can add instant text and images into video output.
Fast application programming interfaces of ByteScout Screen Capturing SDK for VB.NET plus the instruction and the VB.NET code below will help you quickly learn take screenshots during recording. VB.NET sample code is all you need: copy and paste the code to your VB.NET application’s code editor, add a reference to ByteScout Screen Capturing SDK (if you haven’t added yet) and you are ready to go! Code testing will allow the function to be tested and work properly with your data.
ByteScout Screen Capturing SDK is available as free trial. You may get it from our website along with all other source code samples for VB.NET applications.
On-demand (REST Web API) version:
Web API (on-demand version)
On-premise offline SDK for Windows:
60 Day Free Trial (on-premise)
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class Form1
Inherits System.Windows.Forms.Form
'Form overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.buttonScreenshot = New System.Windows.Forms.Button()
Me.buttonStop = New System.Windows.Forms.Button()
Me.buttonStart = New System.Windows.Forms.Button()
Me.SuspendLayout()
'
'buttonScreenshot
'
Me.buttonScreenshot.Enabled = False
Me.buttonScreenshot.Location = New System.Drawing.Point(108, 41)
Me.buttonScreenshot.Name = "buttonScreenshot"
Me.buttonScreenshot.Size = New System.Drawing.Size(100, 23)
Me.buttonScreenshot.TabIndex = 5
Me.buttonScreenshot.Text = "Take Screenshot"
Me.buttonScreenshot.UseVisualStyleBackColor = True
'
'buttonStop
'
Me.buttonStop.Enabled = False
Me.buttonStop.Location = New System.Drawing.Point(27, 58)
Me.buttonStop.Name = "buttonStop"
Me.buttonStop.Size = New System.Drawing.Size(75, 23)
Me.buttonStop.TabIndex = 4
Me.buttonStop.Text = "Stop"
Me.buttonStop.UseVisualStyleBackColor = True
'
'buttonStart
'
Me.buttonStart.Location = New System.Drawing.Point(27, 29)
Me.buttonStart.Name = "buttonStart"
Me.buttonStart.Size = New System.Drawing.Size(75, 23)
Me.buttonStart.TabIndex = 3
Me.buttonStart.Text = "Start"
Me.buttonStart.UseVisualStyleBackColor = True
'
'Form1
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(234, 111)
Me.Controls.Add(Me.buttonScreenshot)
Me.Controls.Add(Me.buttonStop)
Me.Controls.Add(Me.buttonStart)
Me.Name = "Form1"
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
Me.Text = "Form1"
Me.ResumeLayout(False)
End Sub
Private WithEvents buttonScreenshot As System.Windows.Forms.Button
Private WithEvents buttonStop As System.Windows.Forms.Button
Private WithEvents buttonStart As System.Windows.Forms.Button
End Class
60 Day Free Trial or Visit ByteScout Screen Capturing SDK Home Page
Explore ByteScout Screen Capturing SDK Documentation
Explore Samples
Sign Up for ByteScout Screen Capturing SDK Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
Imports BytescoutScreenCapturingLib
Public Class Form1
' NOTE: if you are getting error like "invalid image" related to loading the SDK's dll then
' try to do the following:
' 1) remove the reference to the SDK by View - Solution Explorer
' then click on References, select Bytescout... reference name and right-click it and select Remove
' 2) To re-add click on the menu: Project - Add Reference
' 3) In "Add Reference" dialog switch to "COM" tab and find "BytescoutScreenCapturing 1.0 Type Library"
' 4) Select it and click "Add"
' 5) Recompile the application
' Note: if you need to run on both x64 and x86 then please make sure you have set "Embed Interop Types" to True for this reference
Dim _capturer As Capturer = Nothing
Dim _screencastCount As Integer = 0
Dim _screenshotCount As Integer = 0
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
' Create and setup Capturer object:
_capturer = New Capturer()
' Capture the full screen
_capturer.CapturingType = CaptureAreaType.catScreen
' Set movie width and height to the current monitor dimensions
_capturer.OutputWidth = _capturer.MonitorWidth
_capturer.OutputHeight = _capturer.MonitorHeight
' Setup screenshots
_capturer.ScreenshotImageFormat = ScreenshotImageType.ssitPng ' Save images in PNG format
_capturer.ScreenshotOutputFolder = "\." ' Save to the current folder
_capturer.ScreenshotSavingType = ScreenshotSavingType.ssstManual ' Take screenshots manually
End Sub
Private Sub buttonStart_Click(sender As Object, e As EventArgs) Handles buttonStart.Click
_screencastCount = _screencastCount + 1
Dim fileName As String = String.Format("screencast{0}.wmv", _screencastCount)
' Start screen recording
_capturer.OutputFileName = fileName
_capturer.Run()
buttonStart.Enabled = False
buttonStop.Enabled = True
buttonScreenshot.Enabled = True
End Sub
Private Sub buttonStop_Click(sender As Object, e As EventArgs) Handles buttonStop.Click
' Stop recording
_capturer.Stop()
buttonStart.Enabled = True
buttonStop.Enabled = False
buttonScreenshot.Enabled = False
MessageBox.Show("Screencast saved to " + _capturer.OutputFileName, ProductName)
End Sub
Private Sub buttonScreenshot_Click(sender As Object, e As EventArgs) Handles buttonScreenshot.Click
_screenshotCount = _screenshotCount + 1
Dim fileName As String = String.Format("screenshot{0}.png", _screenshotCount)
' Take screenshot during the recording
_capturer.TakeScreenshot(fileName)
MessageBox.Show("Screenshot saved to " + fileName, ProductName)
End Sub
End Class
60 Day Free Trial or Visit ByteScout Screen Capturing SDK Home Page
Explore ByteScout Screen Capturing SDK Documentation
Explore Samples
Sign Up for ByteScout Screen Capturing SDK Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
60 Day Free Trial or Visit ByteScout Screen Capturing SDK Home Page
Explore ByteScout Screen Capturing SDK Documentation
Explore Samples
Sign Up for ByteScout Screen Capturing SDK Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples