11,296 questions with C#-related tags

Sort by: Updated
1 answer

The keyboard inputs are not updating correctly in the hosted WinForms application

Hi, We are encountering an issue in a WPF application hosted within a WinForms application. The keyboard event is triggered correctly, but the values are not updating properly in the UI.   Here’s the setup: Create a WinForms application with a user…

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,922 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,824 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,443 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,296 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
10,749 questions
asked 2025-02-04T09:07:39.76+00:00
Yathavakrishnan 0 Reputation points
commented 2025-02-12T03:08:01.5633333+00:00
Jiale Xue - MSFT 48,876 Reputation points Microsoft Vendor
1 answer One of the answers was accepted by the question author.

Why MSDN deprecates the AddWithValue method

I am trying to connect to a SQL Server table and update or register data in a program created in C#. In order to create a program that can take measures against SQL injection and support N prefixes, I am thinking of using the AddWithValue method, a…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,443 questions
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
14,477 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,296 questions
asked 2025-02-07T08:02:47.0133333+00:00
那由多 40 Reputation points
accepted 2025-02-12T01:51:33.9833333+00:00
那由多 40 Reputation points
3 answers

SSIS - package working only when there is breakpoint

I have a SSIS package which contains different sequence container, the problem is when I execute the whole package, it executes first 2-3 containers then gets Index out of bound error in next container (In a script task inside a data flow task). But…

SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,643 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,296 questions
asked 2021-09-03T14:21:23.33+00:00
SUNGHOON Kritesh 6 Reputation points
commented 2025-02-11T22:17:14.7433333+00:00
Jeff Ballard 0 Reputation points
1 answer

How to extend execution of background task in WinUI 3 (analog of ExtendedExecutionSession in UWP)?

My application has a background task that performs a cleanup of unnecessary or unused system files selected by the user. However, this task takes more than 30 seconds to complete, which exceeds the standard time limit. Question: Is there any way to…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
4,105 questions
Windows App SDK
Windows App SDK
A set of Microsoft open-source libraries, frameworks, components, and tools to be used in apps to access Windows platform functionality on many versions of Windows. Previously known as Project Reunion.
823 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,736 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,296 questions
asked 2025-02-10T11:59:45.8866667+00:00
answered 2025-02-11T18:58:41.5266667+00:00
Jonathan Pereira Castillo 14,230 Reputation points Microsoft Vendor
1 answer One of the answers was accepted by the question author.

Date converter, looking for good and easy way

Hello, I need to display a date in a different format. How can I achieve this easily? How do I go about it? Thanks for tips in advance. The algorithm Variant 1 //Month: 1=January, 2=February, 9=September, …, A=October, B=November //Day: standard…

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,296 questions
asked 2025-02-05T15:49:20.82+00:00
Noah Aas 625 Reputation points
accepted 2025-02-11T14:17:49.0933333+00:00
Noah Aas 625 Reputation points
0 answers

How to set a time limit for speech recognition in ACS?

I want to set a limit to the time a caller has to describe their problem after StartRecognizing has started. I tried to implement this using CancellationToken, but it didn't work, and CancelAllMediaOperations doesn't seem to be effective either. Here is…

Azure Communication Services
Azure Communication Services
An Azure communication platform for deploying applications across devices and platforms.
1,001 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,296 questions
asked 2025-01-16T11:37:36.75+00:00
Nikolaj Wojke 0 Reputation points
commented 2025-02-11T12:53:51.1866667+00:00
Nikolaj Wojke 0 Reputation points
0 answers

Real-time Transcription in ACS Group video calls

have been working on implementing the Azure Communication Services (ACS) real-time transcription feature and followed the steps outlined in the:…

Azure Communication Services
Azure Communication Services
An Azure communication platform for deploying applications across devices and platforms.
1,001 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,296 questions
asked 2025-01-10T05:09:32.3066667+00:00
Madushika Shiromani 0 Reputation points
commented 2025-02-10T11:02:43.1166667+00:00
Suresh Chikkam 0 Reputation points Microsoft Vendor
1 answer

Error loading file or assembly 'Interop.AcroPDFLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the specified file

Error Message: Could not load file or assembly 'Interop.AcroPDFLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. Stack Trace…

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,296 questions
asked 2025-02-07T16:11:50.19+00:00
Usuario Datawake 0 Reputation points
commented 2025-02-10T09:32:40.9066667+00:00
Jiale Xue - MSFT 48,876 Reputation points Microsoft Vendor
1 answer

How to Save a WPF DataGrid Back to Database after Editing

Hi, I am wondering if theirs a way to save a updated Line from WPF DataGrid back to Database . I don't Know the best way to do this without going back to WinForms Apps. I would like to use WPF, any help would be appreciated.

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,824 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,296 questions
asked 2025-01-22T21:17:16.64+00:00
Luke A'Court 0 Reputation points
commented 2025-02-10T08:12:24.7733333+00:00
Hongrui Yu-MSFT 4,365 Reputation points Microsoft Vendor
1 answer

UWP C# app: Trouble doing drag and drop from home folder

I am working on a UWP app. I have implemented an event handler such that if you drag a PDF file onto our main page, we begin to process that document. This appears to work fine, so I'm pretty sure we are setting things up reasonably. The exception? …

Universal Windows Platform (UWP)
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,296 questions
asked 2025-02-07T16:25:00.2166667+00:00
Fiederer, Jens JF 20 Reputation points
commented 2025-02-10T07:45:40.0633333+00:00
Roy Li - MSFT 33,931 Reputation points Microsoft Vendor
5 answers

.Net 5.0 - Method not found "System.Object.System.Runtime.InteropService.Marshal.GetActiveObject(Stem.String)

Hi While working with .Net 4.8, the following code works as expected: var tcObject = Marshal.GetActiveObject(toolFullName); ```But after moving my project to .Net 5.0, I'm getting the following error meager: "Method not found…

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,296 questions
asked 2022-11-03T00:59:47.267+00:00
Nadeem Bader 21 Reputation points
edited the question 2025-02-10T07:00:13.1333333+00:00
TP 103.2K Reputation points
2 answers

How to Enable/Disable Windows Notification using C#?

Hi everyone, I want to enable/disable System > Notifications. I hope to enable or disable this option without restarting the computer. Change this not work. …

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,296 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
10,749 questions
asked 2025-02-06T06:02:51.7433333+00:00
崇億 張 0 Reputation points
commented 2025-02-10T06:41:15.7233333+00:00
Jiachen Li-MSFT 33,451 Reputation points Microsoft Vendor
1 answer

Get Default Display Settings stored in registry

Documentation for ChangeDisplaySettings says passing null DevMode and 0 flag will revert the monitor to the default setting stored in the registry settings. How to check what the current default setting stored in the registry is before the call?

.NET
.NET
Microsoft Technologies based on the .NET software framework.
4,105 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,296 questions
asked 2025-02-04T19:05:09.29+00:00
Dave Cotton 41 Reputation points
commented 2025-02-10T01:38:12.8366667+00:00
Jiale Xue - MSFT 48,876 Reputation points Microsoft Vendor
0 answers

New outlook (2024) drag drop problem

Hello, I have an application where a user drops a mail (from outlook 365) and I make a copy of the mail) for archive purpose. All is working perfectly but I have seen a message telling me that there will be a new outlook in 2024 (that I can try) and it…

Outlook
Outlook
A family of Microsoft email and calendar products.
4,482 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,296 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
4,263 questions
asked 2023-12-07T12:23:59.95+00:00
Marc Al 206 Reputation points
commented 2025-02-09T23:20:29.98+00:00
David Spink 0 Reputation points
2 answers One of the answers was accepted by the question author.

Sorted number inside in the textbox

I want to sort the value of textbox1 automatically and display into textbox2. I have a code but it not working properly. I insert this code into textbox2. private void textBox2_TextChanged(object sender, EventArgs e) { var count =…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,443 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,296 questions
asked 2025-02-08T22:43:26.04+00:00
YUI-012 140 Reputation points
commented 2025-02-09T03:19:44.52+00:00
YUI-012 140 Reputation points
1 answer

How will I Remove Border From MultiSelect_Chosen Input Form

Please show me what I am doing wrongly with this Multiselect_Chosen Form border removal. My Razor View Below <div class="row"> <div class="col-md-12 col-sm-8 col-xs-12 col-xs-offset-0"> …

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,595 questions
JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
1,043 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,296 questions
ASP.NET API
ASP.NET API
ASP.NET: A set of technologies in the .NET Framework for building web applications and XML web services.API: A software intermediary that allows two applications to interact with each other.
375 questions
asked 2025-02-08T17:17:22.71+00:00
abiodunajai 396 Reputation points
edited an answer 2025-02-08T21:20:20.5733333+00:00
abiodunajai 396 Reputation points
2 answers One of the answers was accepted by the question author.

listbox auto scroll down

I have a listbox and checkbox, Now I want is If I click the checkbox name scroll down the listbox well be scroll down automatically with a normal speed, not to fast and not to slow. I have a sample code: private void checkBox1_CheckedChanged(object…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,443 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,296 questions
asked 2025-02-08T10:16:21.3966667+00:00
YUI-012 140 Reputation points
commented 2025-02-08T12:20:50.6333333+00:00
YUI-012 140 Reputation points
1 answer One of the answers was accepted by the question author.

Issue with Install and configure Visual Studio Code for C# development

I have Visual Studio installed and up to date with .NET desktop development workload. When I go to extensions I cannot find C# Dev Kit nor any of the others listed in the tutorial. Are these no longer available and should I skip this lesson and move on…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,443 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,296 questions
Visual Studio Training
Visual Studio Training
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Training: Instruction to develop new skills.
33 questions
asked 2025-02-06T22:39:26.56+00:00
Mace Wilder 20 Reputation points
edited a comment 2025-02-07T21:09:37.1133333+00:00
Bruce (SqlWork.com) 71,506 Reputation points
1 answer

Missing client certificate

I am using GetHttp2ClientCertificateAsync() to get the client certificate for authentication.When there are a lot of requests, the client certificates is seen to be missing.It is verified that the client does add the certificate for sure.What could be…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
4,105 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,296 questions
asked 2025-02-07T07:19:38.0566667+00:00
Bevan Thomas 60 Reputation points
commented 2025-02-07T09:05:15.0333333+00:00
Jiale Xue - MSFT 48,876 Reputation points Microsoft Vendor
2 answers

Need assistance on creating Microsoft forms dynamically with questions and prefilled answers using c# MVC web app and generate form links

Hello, We have a requirement to create Microsoft forms specific to users with questions like textbox, dropdown, dropdown (multiselect) etc., and prepopulate or pre-fill the answers related to user specific data into the questions and then share the form…

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,296 questions
Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
1,069 questions
asked 2025-02-04T07:30:22.0566667+00:00
Vamshi Konatham 0 Reputation points
answered 2025-02-07T03:20:02.06+00:00
Bhargavi Naragani 655 Reputation points Microsoft Vendor