99,244 questions
-2
votes
0
answers
61
views
Cannot set control height or width [closed]
I am working with Microsoft Visual Studio Professional 2022, C#. Using System.Windows.Forms I have a dialog with an instance of TableLayoutPanel, in the table I am creating a Label following by a ...
5
votes
4
answers
253
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
vote
1
answer
92
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 ...
Best practices
0
votes
3
replies
111
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
75
views
Windows App Forms - System.AccessViolationException Error
I m facing a System.AccessViolationException issues during executing an SSIS package using C#.
I have a parent windows form where i ask the user if he would like to proceed and if so, the parent form ...
-1
votes
0
answers
91
views
COMException: Cannot change thread mode after it is set on EnsureCoreWebView2Async(null) C# in ShowDialog
I am trying to show a modal dialog (ShowDialog) that was created as a WinForm. The dialog contains a WebView2 control that I want to fill using NavigateToString.
I set the Source property of the ...
0
votes
2
answers
103
views
User control wouldn't inherit events any more [closed]
This problem is related to the creation and use of a user control in WinForms. At first, when I found online tutorials, I created a user control library. The first attempt was to modify a checkbox ...
-2
votes
0
answers
44
views
Winform Richtextbox Undo one character instead of all text
I have a MDI parent with few types of childs, a RichTextBox in each. In one MDI child, when I Press Ctrl+Z, ALL the text I wrote in this session is deleted. But in the second MDI child, Ctrl+Z deletes ...
0
votes
1
answer
147
views
Why do Images leave giant piles of RAM behind them? [closed]
I am currently working on a .NET 9 WinForms program that contains an ImageViewer, which is a seperate window where you can scroll through a series of images.
My problem is that even after closing the ...
0
votes
0
answers
134
views
FastReport.NET – PageHeaderBand not repeated on multipage TableObject
I'm working with FastReport.NET in a WinForms project and I have a TableObject that spans across multiple pages. (No datatables, no report definitions)
The table is generated correctly and page breaks ...
1
vote
0
answers
54
views
Is it possible in WinForms to set to Bold Forms Header text? [duplicate]
I would like to know if there is a way to set the Header of form text to Bold.
the property Form.Text is set but can i make it bold?
I want the Form1 in the picture example to be in Bold.
I tried to ...
0
votes
2
answers
189
views
C# : overriding listview view property
I'm trying to override the View property in a derived class from Listview:
public class CustListview : System.Windows.Forms.ListView
{
private CustView mView = new CustView();
public enum ...
1
vote
3
answers
477
views
MethodAccessException with the new Microsoft.Ink.dll from Windows 11 24H2
The situation is that Microsoft.Ink.dll in Windows 11 24H2 has been recompiled with .NET Framework 4.5, overwriting the same 6.1.0.0 version tied to .NET Framework 2.0. As you can see in the image the ...
0
votes
1
answer
81
views
How can I drag the column width of a DataGridView on the designer page when using a custom designer with DesignSurface in a Windows Forms application?
I am currently using DesignSurface to create a custom designer. I want to enable dragging the column widths of a DataGridView on the designer page and record the changes, similar to how it works at ...
0
votes
2
answers
269
views
Can the TextBox portion of a ComboBox be made resizeable on all sides?
Can the TextBox portion of a ComboBox be made resizeable on all sides?
I've done this with the TextBox (shown below). I thought the ComboBox was a composite control with a TextBox & ListBox, so I ...
-1
votes
1
answer
127
views
Filling Winforms datagrid using Postgres stored procedure
I am trying to get data from Postgres table with a help of stored procedure and fill a Winforms DataGrid with it.
This is the stored procedure:
CREATE OR REPLACE PROCEDURE public.get_list()
LANGUAGE ...
4
votes
0
answers
199
views
How does WinForms manage to display ⅓ for the Verdana font when it doesn't exist in that font? And why does it not work for Windows 11?
We had a bug with a □ appearing instead of ⅓ in one of our applications when it was run on Windows 11 rather than Windows 10. This was because we were using a font (Verdana) which did not contain the ⅓...
0
votes
0
answers
75
views
Invoke_Invoked event in Accessibility Insights for Windows
I have an issue with catching Invoke action.
I created a simple WinForms app, with a single text field and a single button. I want to catch the Invoke_Invoked event in the Accessibility Insight ...
0
votes
1
answer
113
views
Can't properly align grid to bitmap in winform
I have a problem with winform Graphics.DrawImage and I hope someone will be able to give me some insight.
I have a bitmap of variable (and considerable) size that need to be displayed in a resizable ...
5
votes
1
answer
164
views
Why am I getting an extra line when drawing polygons?
After some advice from kind people over here, I managed to have my code working. However, an extra line, from the origin of the form to the first polygon point, is also drawn.
I would like to learn ...
0
votes
0
answers
156
views
Unable to print barcode labels on my Dymo label writer 450 Twin Turbo using DYMO.Connect.SDK 1.4.4.21 using C#
I am developing a Winforms app using VS2022 in C# for .NET 4.8 to print accelerated reader labels for books. Some books do not have a barcode on the back so I added to may app the ability to take the ...
1
vote
0
answers
136
views
Design time DataGridView column that cannot be removed?
I need a custom DataGridView that always has a checkbox column as first column.
I know how to achieve this at runtime. Any chance to display the column in the designer?
When added in the constructor ...
4
votes
1
answer
104
views
Customized tooltip for TreeView nodes fails due to the Popup event not firing
We have an old (very old) WinForms application that depended on some 3rd party components that we are no longer allowed to use. One of those components was used to display tooltips on individual nodes ...
0
votes
1
answer
150
views
Get Object Parameter in Hidden Situation [closed]
In C# Windows Forms application, I have problem as follows:
I have tab control with 5 tabs
On each tab, I have a DataGridView (control type is not important and you can consider a panel instead)
...
0
votes
0
answers
89
views
WinForms UserControl: Collection property not updating UI in Designer after editing
I'm creating a custom UserControl in WinForms called SidebarControl, which has a MenuItems property of type List<SidebarMenuItem>. This property is editable in the Visual Studio Designer using a ...