All Questions
1,306
questions
1
vote
1
answer
52
views
Creating a sketch where part of it could be moved at runtime using the arrow keys
I have a very old software for which the source code is not available and I am not even sure what language was used to develop it. I am trying to replicate it using windows forms (C#).
I have stumbled ...
1
vote
0
answers
43
views
How can I access controls of form in another form
I'm working in a windows form application. I have two forms; in form A I have two picture box and in form B, I have a button. I want form B to show a message when I click on picturebox2 in form A and ...
0
votes
0
answers
48
views
C# Winform Change the type of row for data grid view
There is a DataGridView component in C# Winform. It's easy to change the column type to checkbox or text. I wonder that how to change the row type like that?
I tried to find on the internet but there ...
0
votes
1
answer
81
views
Logging to a dynamically created WinForms control using the configuration file with log4net
The case is as follows: I have created a custom control that represents a camera connection and its properties in which there is a ListBox. I instantiate this custom control dynamically at runtime. ...
0
votes
1
answer
65
views
'AutoSize=true' panel height not adjusting when labels become multiline
I'm currently facing an issue with a panel in my C# WinForms application. The panel is docked at the top of the form with AutoSize set to True. Within this panel, I have a TableLayoutPanel also with ...
1
vote
1
answer
89
views
How to change back color on focus tools by dynamically in c#.net desktop application
In my desktop form there are many control. I want to change back color of that active control on Focus & back to its Original color once it lost focus.
Here is my code,
public BillingMetal(Billing ...
2
votes
2
answers
2k
views
How to use Windows 10/11's Dark Theme in C# WinForm controls?
I'm trying to make a C# WinForm App with Dark Mode ability.
Windows already have 'dark themed controls' like this:
(NOTE: This is made with AutoHotkey)
And I also want to use this.
I've searched some ...
0
votes
1
answer
60
views
trying to find and use control using event without ASP
What I am trying to do is create a library of DataGridView functions that I can copy and paste AS IS into a program. For brevity all functions will reference that DataGridView as dgv.
As things stand ...
1
vote
1
answer
112
views
How do I color specific text in a RichTextBox?
So I was making a textbox and I thought that it would be cool if when the user types certain words, they'd get highlighted.
I made a function using a RichTextBox, but it colors, half the text it is ...
0
votes
1
answer
41
views
Update Visual Studio Property grid when a Control referenced in another control is removed from the Form
My custom WinForms control has a property used to select another control on the form. Here is a simplified example of such a property:
private TextBox _targetControl;
public TextBox TargetControl
{
...
2
votes
1
answer
44
views
Get design-time notifications when a Control referenced in another control is removed from the Form
I have a custom control with a property allowing to select another control of a specific type on a form. For simplicity, let it be TextBox controls.
The property of my custom control looks like this:
...
3
votes
1
answer
84
views
Return only a specific type of controls in a container
I use a method like this to return all the controls in a container:
public static IEnumerable<Control> NestedControls(this Control container, bool search_all_children = true)
{
var stack = ...
0
votes
1
answer
49
views
Why does my Control not follow the mouse?
So i was making a new script, and added basic drag functionality, but when i tested it with a placeholder image, nothing happened, it did not follow my mouse, and i don't know why.
using System;
using ...
0
votes
1
answer
202
views
Visual Studio update. Opened a solution in Windows Form VB and there are no controls in my toolbox
I updated the VS studio application and when I tried to start a new solution for a visual basic windows form design the controls were missing from my toolbox. It says at the bottom "There are no ...
0
votes
0
answers
62
views
C# drag & drop panel (Windows Forms) [duplicate]
I would like to create a C# draggable panel. What I want to do is to implement a drag and drop operation between two panels, so that one panel is the receiving panel for a few other panels which can ...