Everything is an error on VS2019 but not VS2017, why?
Hopefully someone can help, I have an android project, works fine with VS2017, but when I open it in VS2019 everything is red(ie: The type or namespace 'System' could not be found...). All the references are shown with a yellow icon, unless I click on…
INotifyDataErrorInfo implementation for several values, check that there are no errors in Dictionary (WPF MVVM)
I have been trying to implement INotifyDataErrorInfo and everything seems to be working except SaveSettings() and especially bool HasErrors. Can somebody please tell me why and how to fix it? I mean that SaveSettings is always triggered, even if there…
Web request not going through with TLS 1.2 enabled in registry in C# application
I have a C# windows application and I am trying to make a web request on a URL using HttpWebRequest. I have enabled TLS 1.2 in the registry at below location …
How do I pass DataGridView selected row value to TextBox in another form?
hello all , i am very new to c# I am creating a small data entry application using WinForms and MSSQL database , In this i need to pass Datagridview selected row value to the textbox , combo box in another form? the datagridview form:…
cryptographic service provider (CSP)
Hi Initializes an instance of System.Security.Cryptography.MD5CryptoServiceProvider. it's work in source code run. but after compiler my code and run exe file not work under windows 10 64bit. public static string EncryptPassword(string s) { …
disable button for user login in winforms
in my winform application , i have 3 forms , Login form Main form Data entry form when the login is "User" , Main form should open , but in the childform "data entry" - "button1" should be disabled. when the…
C# Interop.Excel AddIn Error
Run Excel.exe Run C# Program -> Interop.excel ![50303-image.png][2] My SourceCode Excel.Application excel = new Excel.Application(); Excel.Workbooks workbooks = null; …
What to do with its Java Native Interface library file in its filepath?
I have installed or unzipped the Java Native Interface or JNI library onto my desktop. What I want to perform next is how to reference its file path within the Xamarin IDE in Visual Studio. This question applies to the following: Visual Studio 2019…
C# Xamarin Forms InAppBilling PurchaseAsync not returning after handle of playstore
I am using jamesmontenegro InAppBilling and I have a small issue regarding payments. The code is working fine but after the payment is handled by Google Play Store, the app doesn't handle the procedure and doesn't return if the purchase was successfully…
Check if Checked doesn't work
Why doesn't this work? if (postonly_check.Checked) { fee_double = 0.025; } I researcht and anybody said that postonly_check.Checked works.
get data from sql table throwing null exception even when try block is present
In my WinForms app, i have this below code which fetches the lot number from MSSQL table when the button is clicked , private void getlotnumbers() { try { SqlConnection con = new SqlConnection(cs); …
How to read Excel Marco (.xlsm) file
Hi all, I have code like below to read Excel Macro (.xlsm) file; Microsoft.Office.Interop.Excel.Application objExcel = new Microsoft.Office.Interop.Excel.Application(); object missing = Type.Missing; …
Clickonce update problem
I'm not good at clickonce so I need help to solve my problem. I made a application, and I trying to deploy my app via clickonce. But, I do not want to auto update by clickonce.(this clickonce from .net framework folder) So I uncheck all of…
how to use http listner in windows forums c# app
Hi, I am trying to convert twain(windows forums) into API using HTTP listener in windows forums. But my window keeps freezing. I believe my code is not sending event messages to a main window handle forum when a window is created on that thread when…
Set foreground of child window in Visual Studio
I want to set the foreground of a window in Visual Studio. What i've tried: When i have 2 windows "docked" side by side i can't set the foreground of a window under the mouse in VS. I'm using GetCursorPos and WindowFromPoint which usually…
C# - (this T obj) - feature name
Hello, I have a function like this. Works well, but why? public static string ToXML<T>(this T obj) I call it without parameter! I think the reason is this What is this mechanism called? How can I see if this exists, perhaps via…
Logging problem using the Reader.Read() and lots of processing inside
Hi everybody, I've been working on changes in the application written by someone else. The way the program is structured is that the query is executed into a reader (it may return up to 300 rows). It then reads data and saves them into public fields of…
Quaternion
Hi, what's the difference between concatenate and multiply quaternion in C#?? Thanks
C# - Create unique one-of-a-kind numbers, like GUID
Hello, <message> <header> <to>companyReceiver</to> <from>companySender</from> <type>saveInvoice</type> </header> <body> <saveInvoice> **<invoice…
Can't enable debug layer
I'm using TerraFX DirectX wrapper in a Desktop.WinUI project / .Net 5. I've enabled the debug layer with the following code. cs ID3D11Device* CreateD3DDevice(out ID3D11DeviceContext* pImmediateContext) { …