I want to lock the current HDMI port in C# WPF (.NET Framework)?

Vishal2 Bansal 225 Reputation points
2025-01-16T08:11:55.82+00:00

I want to lock the HDMI port. If a HDMI port is used for a monitor then if other HDMI port is used then i want to lock existing port.

How to do so in C# WPF?

.NET
.NET
Microsoft Technologies based on the .NET software framework.
4,060 questions
Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,814 questions
Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,712 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,217 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Hongrui Yu-MSFT 4,040 Reputation points Microsoft Vendor
    2025-01-17T03:03:13.04+00:00

    Hi, @Vishal2 Bansal. Welcome to Microsoft Q&A.

    There is currently no similar API to lock the current HDMI port.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for 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.