Content
How to develop .net full framework 4.8 class library with VS2022
Using VS2022 and it's a long time since I needed to develop anything non net core stuff. However, today I needed to make a class library targeting .net 4.8 but am not able to find any template other than the core "family" of frameworks as shown…
My solution contains absolute paths to projects inside the solution folder
I have a solution where all the projects are inside the solution's folder. But VS Community 2022 insists on writing their location in the solution file and other project files as absolute paths. Now when I check everything into Git, VS doesn't upload…
the outputData has some unrecognized text?
var processInfo = new ProcessStartInfo { FileName = "cmd.exe", Arguments = "", UseShellExecute = false, RedirectStandardError = true, RedirectStandardInput = true, RedirectStandardInput = true, …
Toast notifies that an exception has occurred
As shown in the picture: my Toast notifications throw this exception: System.Runtime.InteropServices.COMException: "Unspecified error", I copied and pasted https://learn.microsoft.com…
How to remove the red lines?
Dear All, How to remove the red lines?
Visual Studio 2022 & C# Generates Gen:Variant.MSILHeracles.46462 Virus
I am just now learning C# in VS 2022 and when running the simple program shown below Bitdefender detected and quarantined what it considers a virus and generated the message shown below. I suspect this is a false-positive, but I wanted to post this here…
Form's control reference in CustomControl
public partial class sale_purchase_datagridview : DataGridView { private SqlConnection con; private SqlDataAdapter da; private DataTable dt, dt2; private DataSet dataSet; private DataView dataView; …
Sizing the column header's
Hi , I have a datagridview with 5 columns . during run time i saw that there is some space left as shown the figure . Can we adjust it at so that it must not show if in the future the number of columns increase or decrease .
Request for Entity Framework Version for SQL Server Databases
Hello I am using .NET Framework 4.8. I would like to download Entity Framework that supports commands such as Add-Migration, Bundle-Migration, Update Database, Drop Database, Remove Migration, and Get DbContext for SQL Server databases. Which version…
Column Count Error in datagridview
public partial class sale_purchase_datagridview : DataGridView { private SqlConnection con; private SqlDataAdapter da; private DataTable dt, dt2; public sale_purchase_datagridview() { …
Add watermark to PDF file
Hello I tried to adapt the codes below from the internet, but as a result I get a PDF printout without watermark. I wonder where the error is. source code > https://www.pdfsharp.net/wiki/Watermark-sample.ashx string watermark = "DENEME"; …
Adjust records height inside datagridview
the above is a screenshot of my datagridview which has 20records . on initial display it is showing 17 records but the 17th record seems to cut off , how to fix this . also in the same example , i have also used the below code to make the selected…
How to open or launch my desktop application(windows application) developed using C# in browser
I have to launch or open my desktop application developed using C# in the browser? please give me some suggestions on how to achieve it ? Thanks in advance. Explanation: I have a windows app XYZ.exe so I need to open this application from the browser. so…
Couldn't process file Form1.resx due to its being in the Internet or Restricted zone or having the mark of the web on the file
I downloaded code https://learn.microsoft.com/answers/users/53807/karenpayneoregon.html but when I opened the solution file in VS2022 it gives me this error: Couldn't process file Form1.resx due to its being in the Internet or Restricted zone or…
Error when try read data from Excel File in ASP.NET MVC
In an ASP.NET MVC app, I am trying to read data from Excel file but I get this error: The error appears in production mode, but in development mode there's no problem. I am making host on Local Host on my computer Microsoft Excel cannot access the file…
RegEx pattern problem
Hello, I need to split this string into a list. But no pattern works. The easiest thing would be to get the value of all key words back as a string. What is here the right way? string pattern =…
Clear text on pressing escape key
I am a new learner in c# and windows forms . I, in my org . have created a custom datagridview . it has four columns . but i am stuck at a task in which on presses escape key in the first three columns ,whatever data we have typed in , we need to clear…
Got CS4036 error 'IAsyncOperation<BluetoothLEDevice>' does not contain a definition for 'GetAwaiter' ....
Hello, I am getting this error but I do not know how to recover it. Error CS4036 'IAsyncOperation<BluetoothLEDevice>' does not contain a definition for 'GetAwaiter' and no extension method 'GetAwaiter' accepting a first argument of type…
Positional Record vs Nominal Record in C#
Hello, Which one is positional record and which one is nominal record? What are the differences between these? public record Person1 // Is this positional record or nominal record? What are the differences between these? { public…
url to pdf - using evohtmltopdf namespace - edge browser - first attempt fails
I am using evohtmltopdf library to convert formed url to pdf on a button click pdf generates with google chrome successfully at first attempt but with edge browser it fails with error at first attempt when I click back space and click on the same…