Displaying Video
Perform the following steps to create a video display:
Add the SPELVideo component to your project.
Adding the SPELVideo control differs depending on the .NET Framework and .NET6..NET Framework
To add the control to your Visual Studio .NET toolbox, right click on the toolbox and select Choose Items. Select the Browse tab and browse to the \EpsonRC80\Exe directory and select the RCAPINt2.dll file. The SPELVideo control icon will be added to the toolbox..NET6
(1) Add the SpelVideo to the project. Open [Tools]-[NuGet Package Manager]-[Package Manager Settings].
(2) Select the package source from the tree. Click [+] on the top right corner and create a package source. [Name] of the text box: Optional, [Source]: Select the path that has the Epson RC+ installed (If it was installed without specifying a path, select C:\EpsonRC80\API ) and click [OK].
(3) Open [Tools]-[NuGet Package Manager]-[Manage NuGet Packages for Solution].
(4) Click [Browse], search [RCAPINt2] and select it. Select the project you want to install and click [Install]. When installation is complete, the SPELVideo control will be added to the tool box.
Place a SPELVideo control on the form you want the video to be displayed. The control size can be changed up to the full size.
Set the VideoEnabled property to True.
Set the GraphicsEnabled property to True if you want to display vision graphics. You must also attach the SPELVideo control to a Spel class instance using the Spel class SpelVideoControl property.
SPELVideo control placed on a form
When the GraphicsEnabled property is True and the control is attached to a Spel class instance, then vision graphics will be displayed whenever the VRun method is executed on the Controller connected to the Spel class instance.
Here is an example showing how to enable video and graphics on a Visual Basic form where a Spel class instance is used and a SPELVideo control have been placed:
Private Sub Form_Load(sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
m_spel = New Spel
m_spel.Initialize()
m_spel.Project = "c:\EpsonRC80\projects\test\test.sprj"
SpelVideo1.VideoEnabled = True
SpelVideo1.GraphicsEnabled = True
m_spel.SpelVideoControl = SPELVideo1
End Sub
Here is an example showing how to enable video and graphics on a C# form where a Spel class instance is used and a SPELVideo control have been placed:
private void Form_Load(object sender, EventArgs e)
{
RCAPINet.Spel m_spel = new RCAPINet.Spel();
m_spel.Initialize();
m_spel.Project = @"c:\EpsonRC80\projects\test\test.sprj";
SpelVideo1.VideoEnabled = True;
SpelVideo1.GraphicsEnabled = True;
m_spel.SpelVideoControl = SPELVideo1;
}