How do I incorporate web-cam functionality into a VB WinForms app?

Robert Gustafson 606 Reputation points
2020-12-30T16:15:26.85+00:00

WHAT I HAVE:

Visual Basic 2019, .NET 4.6.1, WinForms

MY PROBLEM:

I'm trying the incorporate web-cam functionality into my VB WinForms project. I've read that the CameraCaptureUI class allows one to implement it simply. The problem is, I can't access--using Imports/Add Reference--the Windows namespace, and its various sub-names spaces like Windows.Storage and Windows.Media.Capture. The help says that the Windows.Storage namespace is in the assemblies "windows.dll" and "windows.storage.dll"--but there appears to be no "windows.dll" on my hard drive, and there are several "windows.storage.dll" files--none of which appear to be usable with VS.

Am I missing something?! Please give me an answer ASAP--preferably in VB.NET (although I can convert to that)!

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,904 questions
VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,741 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Castorix31 85,956 Reputation points
    2020-12-30T16:29:21.65+00:00

    If you want to use Windows.Media.Capture (UWP) in Winforms, you must use XAML Islands
    I had posted a sample in C# (~ same code in VB.NET) in this thread

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.