Relative Content

Tag Archive for c#winforms

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.

Form with transparent element

In CSharp, on Windows 11, I have a form with a solid background and a transparent PictureBox. The form loads and PictureBox is actually transparent, but when I move the mouse over the transparent area the mouse handling gets sent to objects behind the form.