99,242 questions
0 votes
0 answers
18 views
WPF Modal Window renders completely white (blank) in Hybrid WinForms application under load
I am maintaining a legacy hybrid application (Main App is WinForms, hosting WPF UserControls via ElementHost). The Problem: When opening a WPF Modal Window (Window.ShowDialog()) from the WinForms main ...
-3 votes
0 answers
101 views
Adjusting Control Width and Height programmatically [closed]
I am using Microsoft Visual Studio Professional 2022. I'm creating forms programmatically adding content based on a JSON configuration, I need to set the size of the controls according to the ...
0 votes
0 answers
24 views
I installed Visual Studio but Controls are grayed out [closed]
My Toolbox controls are grayed out. Winforms, Webforms, doesn't matter. I downloaded the free version of Visual Studio. I have tried a few things that I have seen online but nothing works, so I'm ...
Advice
0 votes
0 replies
29 views
WinForms application - Form Designer - Can't reach this page - Visual Studio 2022 or 2026
I have a older project - WinForms application - and after update of Visual Studio (update 2025) I had a problem to display Forms in both versions of Visual Studio: 2022 and 2026. Form designer just ...
Best practices
0 votes
7 replies
118 views
Need Help to solve a scenario
I'm developing a WinForm application which will used in several companies in the same holding. There is a network connection between them. The scenario which I want to implements is: Company A will ...
0 votes
0 answers
106 views
Winforms panel not redrawing rectangles properly
I am trying to create a tile editor in Winforms. Therefore, I have this code to draw rectangles across my panel: private void panMain_Paint(object sender, PaintEventArgs e) { Graphics g = e....
0 votes
0 answers
78 views
How to remove "Inheritance Hierarchy", "Syntax", and "See Also" sections in SHFB? I need user-style documentation
I'm using Sandcastle Help File Builder (SHFB) to generate documentation. I am not creating technical API documentation — I want to create user documentation (with images and descriptions), similar to ...
1 vote
1 answer
145 views
How do I fill the rectangle with a color
private SolidBrush b; private Graphics g; //Encapsulates a GDI+ drawing surface Pen p = new Pen(Brushes.DeepSkyBlue); //Pens are used to draw objects ...
Tooling
0 votes
4 replies
90 views
c# windows form passport size photo image background change
Any samples for C# Windows Forms passport size photo image background changer. Bitmap bitmap for (int y = 0; y < bitmap.Height; y++) { for (int x = 0; x < bitmap.Width; x++) { ...
5 votes
4 answers
291 views
How to force the Application.Run to wait for all async void handlers?
I have a Windows Forms application and a Form with many async void event handlers. This form can be closed by the user at any moment. After closing the form I want to delete a temporary file, and my ...
-1 votes
0 answers
91 views
Datagridview does not show any data
I have a datagridview in my Winforms app. I set the columns manually in designer and then try to fill it by a function. I check the function step by step and in the last line of code datasource dt has ...
1 vote
1 answer
105 views
Highlighting the datagridview rows
I have a datagridview in my Winforms app with .NET 8. I want to highlight some rows based on the current user role and the request nextlevel. I write this function and call it in form load. But at the ...
-1 votes
0 answers
96 views
Purple outline with WinForms transparent image and text
I am currently working on a little project (like the game Bongo Cat) and I ran into a problem with how the transparent image (a PictureBox) renders with the transparent part. (Also the same with the ...
Best practices
0 votes
3 replies
117 views
How to avoid that a user control changes its size when placed in tab page?
Problem: the user control's size changes when placed on the tabpage What I tried: unset anchoring in the user control's children properties, but it didn't help. The user control designer class: ...
0 votes
1 answer
192 views
How to set window position on different monitor from main window
It's no problem to set the position of the new WinForm inside the monitor where the main window is displayed. For example: Form1 form = new Form1(); form.Show(); form.StartPosition = FormStartPosition....