Category "winforms"

How to export a registry key in C#

I am trying to write a C# code, which will block exe files from running. I found a question about the same topic: example question. In the question suggested me

How do you make a new FlatButtonAppearance object?

I'm running into a frustratingly stupid problem with the FlatButtonAppearance object, which apparently has a constructor that I can't find any information about

How do I create a textBox autoCompleteSource from dataset table?

In my Winform I have a TextBox. I set it to "AutoComplete", and I want to know what to write in my code (c#), to set it's "AutoCompleteSource" to some column's

Windows forms scalling

I'm trying to avoid wrong form showing when "Scale and layout" in windows screen settings is different than 100%. I've folloved this LINK, and it works but only

Dynamically resize TabControl and Form width to the number of TabPages

I have a windows form with a TabControl and a ListView. When I run the application, I want the Width of the TabControl to increase/decrease to show all the TabP

The Enter Key does not close a Form if the Focus is on a Button that is not the AcceptButton

I have a modal Form with three Buttons, A B and C. In addition, I have two Buttons: OK and Cancel. The OK Button's DialogResult property is set to DialogResult.

How to save treeview xml correctly when I edit it in winfroms?

Let's say. If I have this kind of xml file. <Main> <group name="R1"> <IsUser>Example</IsUser> <IsUser>Example2</IsUse

C# Progress Bar Min value is not updating from textbox

Im trying to work with progress bar in C# WFA. My code works but i have problem with Min value of progress bar. It only works when i enter max value first not m

how to hide form1 by clicking button in form2

I designed a form for login that named as form1, and have 2 more form form2,form3 form2 items showing in panel from form1 and what I want to do when I click the

Trying to group __InstanceCreationEvents from WMI Query -

I have a WMI query that notifies me on USB insertions, but I am trying to group the results of this query so that my handler can operate on a batch of these ins

DataGridView with SuggestAppend comboBox columns and dynamic Cell assignment

I have been doing some research and could not find an answer for this, probably I'm not asking the right question or what I'm attempting might not be possible.

form.show doesn't show all the content on the form like forms.showdialog

I am currently developing a GUI that helps users pick a test to run for a DUT. The program controls a bunch of lab equipment via visa com drivers and logs the d

How to load user control to a panel by button click in C#

I wanted to load a user control to a panel with a button, but when I tried this code it shows nothing. I wonder if there is a solution for my problem because I'

DPI Awareness - Unaware in one Release, System Aware in the Other [duplicate]

So we have this really odd issue. Our application is a C#/WinForms app. In our 6.0 release, our application is not DPI aware. In our 6.1 relea

Why are these controls not visible in designer?

In winform, why does a tabcontrol not visible in designer? I have tried a simple example where a tabcontrol is visible in designer whether it's visibility is f

Why are these controls not visible in designer?

In winform, why does a tabcontrol not visible in designer? I have tried a simple example where a tabcontrol is visible in designer whether it's visibility is f

Powershell GUI auto generate buttons with functions

TLDR: How can I make a generated variable, and then call that variable later within a Add_click. I am sure some kind of serialization of each Object/button I ma

Play video using DirectX in C# WinForm

I want to achieve almost something similar here. I want a control that supports both images or video. This will play for some duration. I am able to show the v

Validate 5 digits in the textbox

I am trying to make the textbox valid when just the user writes 5 digits but the problem is if I for example input (11111) it will be correct, the program will

Best Practice winforms async/await keywords

Testing a bit TPL. I use this code and it works: async void button1_Click(object sender, EventArgs e) { MyClass2 mc2 = new MyClass2(); la