Category "winforms"

WPF ScrollBar styles

Is it possible to create scrollbars like in this picture? This picture was taken from this link: http://codesdirectory.blogspot.be/2013/01/wpf-scrollviewer-co

Protecting a file by a password [closed]

I have a C# application in which i'd like to create a file : string fileName = "test.txt"; // a sample file name // Delete the fi

Pros/Cons Using multiple databases vs using single database

I need to design a windows application which represents multiple "customers" in SQL Server. Each customer has the same data model, but it's independent. what w

How to avoid color changes when button is disabled?

We have a Windows Forms project with quite a few FlatStyle buttons. When we disable the buttons, the colors of the buttons are changed automatically Frown | :(

How to show a pop up message with dark background

I'm going to show a error message in my program . I'd like my messages to be like image below, as you can see, I need a dark shadow to be shown when message

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