Category "winforms"

DataGridView RowCount vs Rows.Count

If I have a DataGridView uxChargeBackDataGridView. Are the following syntactically different but effectively the same?: int numRows = uxChargeBackDataGridVi

In visual studio, how do you break the debugger when a property changes that you do not own in a managed language (like C#)

I've got a weird situation where something is setting the TopMost property of the main MDI form to true. After much trial and error we're pretty sure this must

Listbox selected items search with trackbar keyword or Range slider update on save

Language: C# IDE: Visual Studio 2013 Question: How do I set values to a trackbar in VS and then use these values as a variable for another process of my progr

Override TextChanged event for a custom control not working

I tried this code in my custom user control in a C# Windows application: public partial class HtextBox : DevExpress.XtraEditors.TextEdit { protected overri

c sharp exe should ask for "run as administrator" prompt when opened

I am having an exe generated by a c sharp program. when i run the exe, i want an UAC prompt to appear with an option to run the exe as administrator. I have see

How to disable textbox from editing?

I want to use a text box to display some text. I can not disable it, because then the scroll bar will not work. How can I prevent editing within the multi-line

How can I change the background color of the Infragistics' UltraGrid filter row?

Currently this is what it looks like: I'd like to change that blue color, but I don't know what property to change. I've tried changing what I think is t

Form view designer is not working in Visual Studio 2019 with C# .NET Core 3.1 [duplicate]

When I am opening a Visual Studio project with VB.NET then the Form view designer is automatically opened, but when I open a new project

'Forms' does not exist in the namespace system.windows

I have just started working on c#, and was fiddling with some code sample that I got from some forum. This code is using a namespace using system.windows.forms

Check if a record exists in the database

I am using these lines of code to check if the record exists or not. SqlCommand check_User_Name = new SqlCommand("SELECT * FROM Table WHERE ([user] = '" + txtBo

How to solve the error "Must use PackageReference"?

After adding WindowsRuntime to a WinForms-project, building the project fails with Error "Must use PackageReference". The build log is more precise: C:[...]\Vi

How can I obtain a vertical bar that fills, like a progress bar?

As the title says I'm trying to obtain a vertical a bar and fill it depending on values. I couldn't apply any answers I found. One answer suggested replacing Sy

Reset part of application settings

So, I have Form called Preferences with TabControl in it. This TabControl contains several TabPages(General, Advanced, Misc, ...) with few comboboxes, checkboxe

How to do non-cached file writes in C# winform app

I'm trying to determine worst case disk speed, so I wrote the following function. static public decimal MBytesPerSec(string volume) { string filename = vo

Does C# WinForms have a slider control?

Can someone guide me if C# WinForms has a slider control? I see WPF has it but it doesn't show up for me in WinForms what could be the problem?

c#: keep ref parameter from constructor in class

Basically i would like to be able to have a reference to a variable inside a instance of a class, but i'd like the reference to become a class variable so I don

Watermark TextBox in WinForms

Can anyone point me to a good implementation of a basic Windows Forms TextBox that will initially show watermark text that disappears when the cursor enters it?

How to do a background for a label will be without color?

I want to add a label to my form , and I want it without any color- I want just it's text to be visible, I don't find this option in the label's properties, can

How to prevent TextBox auto scrolls when append text?

I have a multi-line TextBox with a vertical scrollbar that logs data from real-time processing. Currently, whenever a new line is added by textBox.AppendText(),

Changing the default icon in a Windows Forms application

I need to change the icon in the application I am working on. But simply browsing for other icons from the project property tab -> Application -> Icon, it