Why in winforms, after form resize does 'screen.getworkingarea( this) .height' return the same value
Attempting to draw a grid on a winforms form. Draws ok. If I resize the form at all the screen.getworkingarea returns the original values and redraws the grid to the same size with the resized section blank. Having stepped through the code I can see…
Check app configuration in a EF migration class
Hello, I have an web api hosted in Azure that connect to an SQL Database. Any changes to the database schema are done through EF Core Migrations. In a migration class (Microsoft.EntityFrameworkCore.Migrations.Migration) I would like to access the…
Speech Recognition customize engine question on Windows
Hi MSFT member, On windows, when developing a Speech recognition app, there are about three solution APIs: Windows.Media.SpeechRecognition System.Speech Programming Guide for .NET Framework Microsoft Speech API (SAPI) Since We want to use local…
Another instance of an entity raises an error when update
In my ASP.NET Core 9 Web API and Entity Framework Core, I have a model class for a Client that has a relationship many to many with the model class Channel. public class Client { [Key] public long ID { get; set; } } public class Channel { …

Inserting a bitmap image into excel
Hi All, I have created a BitmapImage object in C# from SQL server database table: var image = new BitmapImage(); using (var mem = new System.IO.MemoryStream((byte[])dataRow[columnName])) { mem.Position = 0; image.BeginInit(); …
Azure PuSub with protobuf data not working
I am using generic WebSocket client (System.Net.WebSockets) to connect to Azure Web PubSub service and communicate between two parties. I referred this official document. I was able to communicate using json but with protobuf I don't receive any data.…
Capture Touchpad events only
We are trying to monitor the Touchpad event like touchpad left click, touchpad right click, or touchpad double tap, etc. I have a few questions w.r.t. TouchPads. How to monitor Touchpads events? How to differentiate between Touchpad events and Mouse…
VCore seconds used in SQL Query
Is there a process I can run to determine how much compute time (VCore seconds) was used by a previous query (select/insert/update/delete). I am thinking of something similar to "SELECT SCOPE_IDENTITY()" that returns a system generated ID…
How do I configure the dotnet Console logger to not emit the log level?
I am using the stock standard console logger, however it is unuseful for me to have info: at the start of each line - how can I remove this via config? 2025-02-28T00:02:10.553Z info: Scope.Scope.Scope[0] blah blah blah Here is my current…
How do you use the SqliteVectorStore in Semantic Kernel?
I have managed to get some basic RAG working with semantic kernel in C#, by creating a VectorStoreTextSearch object based on an InMemoryVectorStoreRecordCollection inside a InMemoryVectorStore and creating a KernelPlugin using…
A connection was successfully established with the server, but then an error occurred during the pre-login handshake.
I am getting below exception for database connection with MAUI android emulator. Can you please help us to resolve issue. Microsoft.Data.SqlClient.SqlException: 'A connection was successfully established with the server, but then an error occurred during…
Different record returned from SQL Server Management Studio and a C# ExecuteReader with the same exact query?
I am using the EXACT same query in SQL Server Management Studio (2014) as I am in my C# program, but I get different results. How is this possible? My Query: SELECT tblWTHistory.Date, tblWTHistory.EstCompDate, tblOperator.BadgeID,…
How do I extract images from a document
I'm using: "Operation< AnalyzeResult > operation = client.AnalyzeDocumentAsync(WaitUntil.Completed, "prebuilt-read", fileUri).GetAwaiter().GetResult();" to obtain a documents text and OCR text. Is it possible to also obtain the…

Only one compilation unit can have top-level statements. Visual Studio code error
Hi, I am trying to compile some code and keep getting this error. I deleted the code and rewrote it but still getting error CS8802 after inititiating dotnet run in terminal. See my code below: using System; int currentAssignments = 5; int[]…
AppShell- Failed to Navigate Back, Ambiguous routes matched for.... but i've only registered routes once
I am building an Xamarin Forms app for iOS and Android. I registered my routes in AppShell.xaml.cs globally like this: **-AppShell.xaml.cs-** Routes.Add(nameof(HousingFolderPage), typeof(HousingFolderPage)); Routes.Add(nameof(HousingFolderDetailsPage),…
Upgrade .Net framework 2.0 to latest version
My current project is .Net Web Form with .Net framework 2.0 version (Visual Studio 2005). I want to change .Net framework latest version (with Visual Studio 2019). Is this possible 2.0 to 4.8 directly. Or, should I change to another version (like…

Has C# a cursor data type
Dear All, I am converting a Visual FoxPro (VFP) program to a C# program. In VFP there is a data type "Cursor" (with columns and rows) to store data retrieved from SQL Server. Has C# a similar data type? For example, the following screen capture…

How to combine multiple xml files with different schema to one csv file
I have 33 xml files with different schema to convert to one csv file.
My Create a bot template is not completeing
I'm trying to deploy a bot using the 'Create a bot' from Language Studio. I've followed all the instructions and it is just hanging. I've just upgraded to developer support is this it?
NET Core 3.1 app clickonce publish include a folder(from library project)
WPF Prism desktop project sln module folder data.txt module.cs app app.cs app references module module is a .dll project app is .exe project <Content Include="folder\data.txt"> …