Category "winforms"

How to store a video file in exe file in c# and play it

I am working with winForms in c#. I want to access video file from resources without using any dialog box for load or select. That means I want directly store v

show/ hide items in the listbox

I make a listbox and it works perfectly, I also made a search function, but I want to hide the items in the listbox and show them only when searched through ind

How to use SendInput to simulate the UP arrow key press (or other extended keys)

I am trying to programmatically simulate the pressing of the UP arrow key on the keyboard for an end-to-end test. With the below code, the GUI control receives

setting VerticalScrollingOffset programmatically

I'm using a custom scroll bar and the problem I'm facing now is that when I have thousands of rows in a datagrid and scroll all the way to the bottom, dataGrid.

Is it possible to detect Windows dark mode on winforms application?

I am developing a winforms application using all those flat style options, and it makes the application look a lot like Win10 applications, so I was wondering i

How to solve the error that prevents clickonce app to start

BACKGROUND: I'm having a problem with a ClickOnce WindowsForms NET 4.8 App that now is composed of a Solution with 2 projects. All began after auto generated ce

Microsoft UI Automation/Get The Item That The User Clicks

I am trying to figure out what item (for example document, web page tab, window, picture, folder) the user has clicked on. I started by using the following code

Preventing Winform from being maximized?

I want to prevent my desktop application from being maximized. It should not become maximized by any means - by double clicking on title bar, or by clicking Win

VSTO with Windows Form and Worker Threads

I have an Office addin (Outlook if it makes a difference) created with VSTO. The addin creates a Windows Form at startup. My Form creates several threads. I'

Save rich text boxes as pdf files and send an email with attachments

I want to save rich text boxes as pdf files. Each time I save a file Adobe Reader can't open it. private void button3_Click(object sender, EventArgs e) { Sa

How to start tasks after cancelling

I have a Windows form with three buttons. One button adds entries to a BlockingCollection. One starts processing the list and one stops processing the list. I

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