Is there a way to access a windows sign-in window with using C# windows form .net framework
i tried to write a code that monitors incorrect password in the windows; in that if someone tries to access to my laptop and enters an incorrect password the code gets the incorrect password message and leaves a messageBox with text about the failed password entry .
Is there a way to find application registry key under HKEY_CURRENT_USERSOFTWARE?
I wrote a .Net 4.7.2 Framework Windows Forms application using C# and VS 2019.
Adding Squeduled Task to a VM
I’m trying to add a Squeduled Task to my VM, but i keep getting the following error:
– (HRESULT: 0x80070032).
Here is my code for adding the task:
Changing variables from one form in another form
Is there a way to change variables that are in Form1
from Form2
?
I tried using method in Form1
, and calling it from Form2
.
Here is a method in Form1
to change variables that I wrote:
Cannot change or use global variables in C# (WinForms .NET)
I’ve declared a few int
variables inside public partial class Form1 : Form
in C#. However, i can’t use or change them if it isn’t done inside a function (e. g. inside of private void button1_click
), as if the variables never existed. It gives a “”IDE1007: The name ‘r’ does not exist in the current context” error when trying to change tha value of r
. That said, I can’t create a pen using Pen dot = new Pen(Color.FromArgb(r, g, b));
, trying to do so gives another error, “CS0236: A field initializer cannot reference the nonstatic field, method, or property from “Form1.r”” (I’m trying to make a sort of MS Paint clone).
Positions of pictureboxes not same in runtime and in design
I’m using C# WinForms, and I noticed that positions in design and runtime are completely different. Let me demonstrate:
Bulk copying excel to a sql database copies a column incorrectly
I’m trying to do a bulk copy of the contents of an excel sheet to a SQL Table. The thing is, there is a column in the excel sheet that is called ISBN
, almost all the time the values are composed of numbers (always integers), but sometimes, it has some letters, like an X. But after the bulk copy is done and I check those records that have letters in the ISBN
column, the ones that have a letter are null
. So, this column should be treated as a string
(everything is set-up to do so but I can’t find out why it does not).
How to navigate between Window Forms in C++
I am new to C++ and .Net Framework, I am using it build a Windows Application that has a login feature. The login form then goes into a User Interface according to the type of the user. This form will have a logout button once pressed, it will close this form and opens the login form. The problem is that once opening the login form, my logic makes the application finishes and return 0 at the end. How can I make it that it will never end until user explicitly presses the close button ?