Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
64 views

I need to count the number of columns in a Table in an Access Database. The following code does the job, but I wonder if there is a better way using INFORMATION_SCHEMA.COLUMNS ? CmdStr = $"...
1 vote
4 answers
3k views

I've tried searching but nothing really matches my demand. I don't want explorer.exe to be terminated or restarted. I just want any open explorer windows to close.
3 votes
3 answers
27k views

I am working on a C# .Net Windows application. Here I create report using Infragistics.Documents.Report and export to .pdf & .xps format. Here I want to bringthose 2 files(.pdf & .xps) into ...
-2 votes
0 answers
61 views

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 ...
-1 votes
0 answers
78 views

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
92 views

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 ...
0 votes
1 answer
305 views

Maybe the header doesn't make sense, but what I want to do is in OnBeforeLabelEdit remove the suffix from the node. There is a problem however, because when I write node.Label.Text = "Some text ...
0 votes
1 answer
202 views

I have vb.net winform application which creates a folder and moves some files into the folder. But when folder path goes long for example E:\WF_2324\WF_2324_The Shadow Of The Sycamores\WF_2324_The ...
30 votes
7 answers
33k views

Some of our non-technical users are having problems where a dialog MessageBox in our application can sometimes be displayed behind the main form and the application does not accept any input until the ...
Best practices
0 votes
3 replies
111 views

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
164 views

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....
0 votes
1 answer
104 views

I get this error: Failed to emit module 'xyz': Changing the version of an assembly reference is not allowed during debugging: 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=...
1 vote
2 answers
6k views

I have some code in Windows Forms application. I want to change the visibility of my drop down ToolStripMenuItems in code. I set the Visible property, but when I set a breakpoint and inspect the ...
99 votes
5 answers
83k views

Up until now, I just put a try/catch block around the Application.Run in the Program.cs entry point to the program. This catches all exceptions well enough in Debug mode, but when I run the program ...
7 votes
3 answers
6k views

I'd like to implement a feature in my application where show a dialog to the user, and the main form (similar to how jQuery looks). My only idea is to take a screenshot of the form, place it as the ...
1 vote
3 answers
478 views

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
0 answers
115 views

I am following this tutorial to create a custom control that inherits from one different than UserControl. When opening the designer view of this control, instead of seeing a render of the control, I ...
-2 votes
0 answers
44 views

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 ...
12 votes
3 answers
3k views

I have a label with AutoEllipsis = true and TextAlign = ContentAlignment.MiddleLeft. When I enter a text that is not extending the label width, the text is vertically aligned to the middle of the ...
-1 votes
2 answers
1k views

I have one application built with WinForms with a big number of forms on it (approximately 90 forms) and now there is a requirement that when any form is opened the first input should get focused, so ...
24 votes
10 answers
21k views

How can a button be bound to a command in a view model like in WPF with MVVM?
12 votes
13 answers
25k views

I have created an application in Visual Studio (C#) that makes use of a datagridview. Now, when I assign the DataSource of that datagridview, it automatically selects the first row, and executes my ...
0 votes
1 answer
9k views

I want to create an Application for editing user accounts on a Server. The Server do not use AD only local accounts. I use the following code to connect the remote server: try { ...
1 vote
1 answer
966 views

I'm doing a (custom drawn) custom contol in C# (Windows.Forms). Mouse cursor shape should depends on what part of my custom control is currently under cursor. (Let me call it "dynamic cursor"...
0 votes
1 answer
147 views

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 ...

1
2 3 4 5
1985