Category "winforms"

How to color different words with different colors in a RichTextBox while a user is writing and raise an event when that colored text is clicked

When a user writes some words in a rich text box, if that word matches some specific word, than the color of the that word should automatically change. When th

Not able to get Costura.Fody to work, keeps asking for the DLL

I have installed costura.fody into my project using nuget package. I have updated the FodyWeavers.xml file with: <Costura Unmanaged32Assemblies='dllname' U

How to find oaut_consumer_key in Twitter api?

I was downloading a Demo of Twitter "xAuth with .NET" from this Article link http://www.voiceoftech.com/swhitley/index.php/2010/03/twitter-xauth-with-net/ Click

Transparency for windows forms textbox

I'm using windows forms in C# and I need to make a textbox's background color transparent. I have a trackbar that goes from 0 to 255 that is supposed to control

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