Relative Content

Tag Archive for c#winforms

Add items to listbox if not exist

i’m having an issue with my code, i’m trying to add items from directory to listbox, the issue is i keep getting the same items (doplucate) over and over again

How do I write and call an event between classes for Winforms?

I am attempting to write a Winforms application that interfaces with an SQLite server for a class. One requirement is for users to be able to make an account, so I need to remove the login control and replace it with the actual app control. I figured that the best solution would be to make an event, but I cannot for the life of me get it to work. I’m not sure how to use delegates, but from my understanding I don’t strictly need a delegate for this purpose.

Internal Class Public members

I had been asked an interesting question around why internal class members were declared public, not internal in my PR.

Form displays empty if not modal

In WinForms, I created a form to display the version number of the application.
It only contains labels, and a timer to close it.
I have an hesitation about this.
If showed modal, it works very good; but of course, it delays the rest of the application, if I want to let time to read a description.
If showed not modal, it displays its background, and nothing else.
I am thinking about a way to stimulate the loading of the texts, without refraining the execution of the application.

My Project cannot load a .cs file that is in the folder

very new programmer here,
I just completed a C# winform project and wanted to rename my project folder to something else (bad idea). After I renamed it, my code would not compile and gave me a CSC : error CS2001: Source file ‘myfile.cs’ could not be found.