Category "winforms"

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

Infragistics Selected Node

Would like to know if I am the error or I have encountered a bug. I have a grid with parents and children. I have made buttons to move the nodes from top to bot

Adding launch conditions to Microsoft Visual Studio Installer Projects (check app is running)

I'm using Microsoft Visual Studio Installer Projects for my Hybrid Widndows Forms/WPF project. I need to make sure the user has closed the Application (an older

Split an Image into different PictureBoxes

I have a Image with size 187x16 which contain 10 smaller Images in a row. I want split those Images into 10 different PictureBoxes. Original Image: Dim

Running .dtsx file via command line programmatically from a winform c#

I am new to programming. I was hoping for some help to correct the below code. I have a WinForms application using an Azure SQL database. overall I am trying to