99,117 questions
Advice
1
vote
13
replies
145
views
Wpf or Win Forms - tile editor
I'm trying to create a console application game to really push the boundaries of what a console game can do and look like. I'm going to need to create maps with ASCII tiles and think it could be fun ...
-2
votes
1
answer
109
views
How to resize Form and a button but keep the button square
I have a form with a button which has a background image 98*98. As the height of the form increases I want the buttons height to increase as well but I want the button to remain a square to keep the ...
0
votes
2
answers
142
views
Why is this VISA instrument/SCPI communication blocking the UI thread and how can we fix it?
This is what we have arrived at as the minimum reproducible example, this is a standard .NET Winforms application created from scratch in Visual Studio with copy pasting this code into the Form1.cs ...
Best practices
0
votes
4
replies
111
views
What is the best way to deselect a menu item?
My program shows an error message box related to a menu item action, and I want to select that menu item to make clear the relation. I use MyMenu.Select() to do it, and after the message box is closed ...
1
vote
0
answers
68
views
After focusing WebBrower's scrollbar, keyboard hot keys stop working
I have form with a WebBrowser component & a few buttons that can be activated via F1, F2, F3, F4 keys. Form's KeyPreview set to True.
Here is the KeyUp event handler for the form:
Private Sub ...
Advice
0
votes
2
replies
104
views
Visual Studio Forms Designer UI Looks Like WIN7?
I'm using Win11 and Visual Studio 2022. When designing a windows desktop form in the IDE it shows windows UI elements from windows 7. When running my app it shows windows 11 UI elements and does not ...
0
votes
1
answer
89
views
StartUp form not opening as designed
I have a VB.Net project started in VS2019 with a startup form that opened as designed. After replacing my PC and installing VS2026, the startup form opens showing only the middle portion of the form (...
Advice
0
votes
9
replies
154
views
C# winforms how do I Dock a label in a Panel
I have a simple panel containing just a label. As the form is resized so does the panel and I am trying to get the label to resize with the panel so the text gets bigger and smaller. I was hoping just ...
-1
votes
1
answer
117
views
MDI child window: which buttons/icons are shown after maximizing and then minimizing?
I had a discussion with a colleague about classic MDI behavior, but neither of us are C# developers, and we couldn’t find a clear example of this specific scenario in tutorials or videos.
The scenario:...
3
votes
1
answer
138
views
TreeView.AfterSelect triggered by TreeView.SelectedNode = null
I am just learning C# and I am struggling with a treeview in a Winforms project. According to MSDN the TreeView.AfterSelect event does not occur when a tree node is unselected:
https://learn....
0
votes
0
answers
85
views
Why does drag and drop work for webview2 controls in UAC elevated privileges applications?
In Windows, it is a known issue that drag and drop does not work from normal application to UAC elevated privileges windows due to UIPI policy.
However, I notice that webview2 controls within a UAC ...
Advice
3
votes
5
replies
124
views
C# transfer data from an another form via MySQL
I am building a simple CRUD application in C# WinForms to practice database operations. I have a DataGridView that loads user data, and I want to open a separate edit form (formEdit) when a cell is ...
Best practices
3
votes
5
replies
142
views
Beginner WinForms project with CSV loading, ComboBox data, dynamic controls and deletion
I am practicing C# WinForms and I created a small beginner project to better understand how the basic WinForms components work together.
The application reads color data from a TXT/CSV file. After ...
-3
votes
1
answer
172
views
Getting an animated image to work on a Winforms tooltip
I have:
Created a custom class ImageToolTip, which displays a tool tip with an image
Got it to work when programmatically assigned to tool strip buttons
What I cannot get working is animating this ...
3
votes
2
answers
112
views
Unable to roll back CefSharp.WinForms.NETCore
I'm trying to roll back my C# Winforms .slnx solution to determine which repo check-in introduced an unrelated bug. When I roll back to a version that worked 6 weeks ago, the app crashes on startup, ...