Click here to Skip to main content
15,886,036 members
Everything / Desktop Programming / Windows Forms

Windows Forms

WinForms

Great Reads

by Josh Smith
A task-oriented review of an animation library and the application which uses it
by Nish Nishant
This articles explains how to implement a TypeDescriptionProvider for a class to support multiple object types using a single class type
by Marc Clifton
Review your project dependencies.
by Nish Nishant
An ExifReader class in C# that supports custom formatting and extraction. StyleCop compliant code, with demos for WPF and Windows Forms.

Latest Articles

by Ralf Meier
The article walks through ShellySceneComponent and ShellyScenesComponent, which allow users to define scenes with multiple actions assigned to a control or controls for Shelly devices.
by Ralf Meier
This article is a continuation of a series on controlling Shelly® devices in a smart home. It introduces a component that works with standard controls without requiring adaptation.
by Graeme_Grant
.NET compliant Silent ClickOnce Update Background Worker Service for Winform, WPF & Console in C# & VB
by Mirnes Mrkaljevic
Make WinForms testable

All Articles

Sort by Score

Windows Forms 

9 May 2012 by Josh Smith
A task-oriented review of an animation library and the application which uses it
16 Jun 2008 by Nish Nishant
This articles explains how to implement a TypeDescriptionProvider for a class to support multiple object types using a single class type
17 Jun 2009 by Marc Clifton
Review your project dependencies.
29 Mar 2010 by Nish Nishant
An ExifReader class in C# that supports custom formatting and extraction. StyleCop compliant code, with demos for WPF and Windows Forms.
2 Dec 2011 by Florian Rappl
A better ToolTip for Windows Forms and more.
18 Apr 2010 by Nicholas Butler
A tiny HTTP server wrapped in a WebBrowser control
6 Aug 2009 by Marcelo Ricardo de Oliveira
Demo for a math puzzle board game
31 Jan 2010 by Arik Poznanski
Complete Library for using the Windows 7 Ribbon from C#, including 18 samples and 21 blog posts documenting the Ribbon features
11 Sep 2011 by Anshul Mehra
This article provide APIs & functionality so that Excel Quits after automation
19 Feb 2021 by Leif Simon Goodwin
A 3D surface plot control in C#
4 Jul 2014 by Chakravarthi Elchuri
How to use WIA supported scanner using C#
22 Dec 2016 by Ozesh Thapa
Converting Docx To Html to Docx
28 Nov 2011 by Akos Orban
Set Owner of a WPF Window to a Form
12 Oct 2023 by Graeme_Grant
.NET compliant Silent ClickOnce Update Background Worker Service for Winform, WPF & Console in C# & VB
11 Sep 2009 by yetibrain
A listview running in virtual mode
10 May 2009 by DaveyM69
Allows changing of the default MIDI out device in Vista and Windows 7
15 Mar 2010 by Arik Poznanski
In this article, I'll present how to use the ribbon drop down color picker control.
23 Mar 2010 by Arik Poznanski
In this article, I'll present how to work with the ribbon quick access toolbar.
17 Nov 2011 by Timur Eroglu
List and extract .NET resources
5 Aug 2009 by Cosmin Oprea (aka somalezu)
This article describes a very simple way to make WinForms databindings without the need to refer the datasource property names with magic strings.
10 Sep 2009 by ralph1957
This step-by step article describes how to populate a TreeView control by using XML data.
6 Mar 2010 by Arik Poznanski
In this article, I'll present how to use the ribbon application menu with ribbon split button and ribbon drop button controls.
9 Mar 2010 by Arik Poznanski
In this article, I'll present how to use the ribbon combo box control.
22 Mar 2010 by Arik Poznanski
In this article, I'll present how to work with ribbon context popup.
2 Nov 2010 by Nish Nishant
Looks like you are looking for an auto-complete textbox. If so, see:http://www.codeproject.com/KB/cs/AutoCompleteTextBox.aspx[^]It's written in C#, but you can use that from VB.NET.
31 Oct 2016 by phil.o
This article describes the building of Markov Chains and their use for generating random names or words.
23 Dec 2018 by charles922
Introduction to Orbital Mechanics - 2 Body Problem
21 Apr 2009 by Fredrik Bornander
How to implement an iPhone style icon menu using the .NET Compact Framework.
7 Mar 2010 by Arik Poznanski
In this article, I'll present how to use ribbon tabs, groups and the ribbon help button control.
19 Mar 2010 by Arik Poznanski
In this article, I'll present how to load ribbon resources from external DLLs.
20 Mar 2010 by Arik Poznanski
In this article, I'll present how to work with ribbon application modes.
17 Jan 2019 by Ramon F. Mendes
A lightweight HTML control for WinForms
14 May 2009 by CS Rocks
This article demonstrates how to upload a file to a (HTTPS) WebDAV server in VB.NET.
14 Feb 2010 by Irfan alam
A library for creating a voice and text conferencing application
4 Mar 2010 by Arik Poznanski
In this article, I'll present how to use the ribbon application menu.
14 Mar 2010 by Arik Poznanski
In this article, I'll present how to use the ribbon check box and toggle button controls.
21 Mar 2010 by Arik Poznanski
In this article, I'll present how to work with ribbon contextual tabs.
23 Mar 2010 by Arik Poznanski
In this article, I'll present how to work with the ribbon recent items control.
30 Nov 2011 by Marc Clifton
Revisiting the XTree implementation, using a generic controller.
8 Mar 2013 by Michael Haephrati
Generally speaking you need to use separate threads for the loading. I don't know what your application does during these long seconds, but whatever is done, can be done in the background. During that time you can display a Splash screen (static or animated one), so the end user will not feel...
21 Oct 2008 by Günther M. FOIDL
A component that allows the customization of menu shortcuts. This can be useful for barrier free applications.
19 Feb 2010 by Uwe Keim
Small tool to monitor the clipboard for images and upload them to Twitpic
16 Mar 2010 by Arik Poznanski
In this article, I'll present how to use the ribbon font control.
3 Apr 2012 by Alan N
There is something odd about the ForeColor property of a read only System.Windows.Form.TextBox which I haven't seen documented, although I haven't looked very hard.I've noticed that a foreground colour change only takes effect after the background colour has been changed once. After that...
17 Aug 2009 by Paw Jershauge
An easy to use ListView group sorter (very simple).
30 May 2011 by Sergey Alexandrovich Kryukov
Well, if you try to create artificially simplified use cases as you present in your Question, you don't have a chance to see "Extra Advantage", right?I would prefer talking not about "advantage", but about a principal technological feature. What's so special about delegates; what is the...
26 Aug 2012 by Wendelius
The tip shows one way to resolve if a user control is in design mode.
5 Jul 2013 by Johnny J.
A sample owner-drawn ComboBox
14 Aug 2013 by adriancs
A program/application for learning and writing HTML. Get instant visual effect side by side with your code as you type. Support HTML5, Javascript and CSS3 elements.
16 Feb 2014 by RhishikeshLathe
Completely Remove flickering due to TableLayoutPanel & Panel in windows form go as follows:=-1. Set double buffered property of Form =true.2. Paste Following 2 functions in form.cs#region .. Double Buffered function .. public static void...
29 Jun 2016 by The Zakies
we would create Hand_tool to pan through the drawing form, and we would use a custom cursor of open and closed hands
19 Feb 2011 by #realJSOP
Determine the number of unique colors in an image
22 Mar 2012 by Shahin Khorshidnia
HelloLook at this:http://msdn.microsoft.com/en-us/library/system.threading.eventwaithandle.aspx[^]And pay attention to EventWaitHandle.WaitOnehttp://msdn.microsoft.com/en-us/library/system.threading.eventwaithandle.waitone.aspx[^]
9 Mar 2010 by marc ochsenmeier
Use the new PLA interface to monitor performance counters and trigger alerts.
7 Feb 2011 by Espen Harlinn
Windows Forms does not support the idea of event bubbling, but you can always add an event to your UserControl, route all mouse click events for the child controls to a single event handler, and then fire the event.RegardsEspen Harlinn
26 Jul 2011 by OriginalGriff
For goodness sake! You need to do some basic research into voice regocnition. As I suggested to you yesterday, google can help, but you are going to have to do some work.The simple approach you are trying to use will never work. Why not? A first, simple reason:When did you start talking...
29 Nov 2011 by Savalia Manoj M
You Can try it in MS-SQL Like Declare @Month BigintSet @Month =11Declare @date date;Set @date='2011-11-01'while DATEPART(Month,@date)=@MonthBegin --Select DATEPART(DAY,@date); --Select DATEPART( WEEKDAY, @DATE ) DECLARE @Name VARCHAR(20) SELECT @Name = CASE (...
3 Apr 2012 by OriginalGriff
You can't, without a lot of work.When you set the textbox to readonly, the foreground and background colours are overridden and ignored in favour of the system disabled colors - and it is a BAAAAD idea to change them.The easiest way to do it would be to create your own control, derived...
1 May 2012 by Ivan Ičin
Custom WinForm ToolStrip that fixes some of the ToolTip related problems and adds few related features
6 Mar 2016 by Hiske Bekkering
A simple explanation of how to synchronize custom painting with a ProgressBar's default painting.
20 Mar 2016 by Afzaal Ahmad Zeeshan
In this episode I am going to talk about using graphical applications in Mono. The graphical framework to use would be Windows Forms.
28 Apr 2010 by Keith Barrow
If you have a Winforms application that auto loads data, there is no doubt that you’ll have come across the problem of data loading at design time (i.e. when opening the code in the designer). At best, this slows the designer down, at worst it might crash VS and prevent the control from...
1 Apr 2010 by Brian C Hart
An adaptation of Nick Thissen's article on VBForums translated to C# and bottled up into a Class Library you can just drop into your projects.
26 Jan 2011 by #realJSOP
When you need to communicate with the app that contains your ServiceHost object, use custom events
9 Apr 2011 by Nish Nishant
Yeah, that is standard behavior with the ComboBox (in Winforms). Once you drop down the control, then even if you select the same item that was previously selected, SelectedValueChanged will fire! I reckon you'd have to keep a currentSelectedValue and then compare against that each time it...
5 May 2011 by OriginalGriff
Please don't!That's the simple answer. You can't access the buttons on a differnt form because they are declared private by default. If they weren't, then the two forms are always tied together - if you change one, you have to look at how that change might affect the other form. This makes...
4 Jun 2011 by Sergey Alexandrovich Kryukov
What Abhinav suggested is not so practical in terms of performance and may not be suitable for big files.Here is what you can do:static void CopyFileWithExcludedLine(string inputFileName, string outputFileName, ulong excludeLine) { ulong lineCounter = 0; ...
27 Jun 2011 by charles henington
8 Jan 2012 by Bill SerGio, The Infomercial King
Resizable Skins Made from Web Pages with Video
31 Jan 2012 by CPallini
C# has no global variables. Possibly do you mean a class member variable?In the reset button you are declaring (and initializing) a new instance of the variable and thus shadowing the (possible) class member variable.You have to change (in the reset button command handler) from:...
16 Jul 2012 by OriginalGriff
There is only one way: to create an abstract class that inherits Form, and derive your form from that. It can then also implement the interfaces.You cannot derive from an abstract class and the Form class together - the inheritance hierarchy only allows the one base class, abstract or...
19 Sep 2014 by Abdul Samad KP
public void Excecutesql( params object[] Obj) { }
8 Jun 2015 by Dirk_Strauss
LEADTOOLS Recognition Imaging SDK - I had the pleasure of taking the SDK for a spin, and let me tell you it was well worth it.
2 Sep 2015 by Richard MacCutchan
Please learn how to use Google: https://www.google.com/search?q=register+assembly+in+GAC[^].
2 Sep 2015 by Maciej Los
The best way to learn is to read the documentation:Global Assembly Cache[^]How to: Install an Assembly into the Global Assembly Cache[^]
1 Oct 2015 by Steve Aube 1
This article describes a new alternative approach for Automated Testing of User Interfaces (UI).
8 Nov 2016 by Niemand25
A simple way to place any ObjectListView inside a ComboBox
10 Nov 2016 by Mehedi Shams
Coding a simple magic with cards!
7 Dec 2017 by Dukhabandhu Sahoo
This article explains how to display a loading indicator (a GIF image) in Windows Forms application when some long running task is performed in the background.
13 Aug 2020 by Howard 9448490
Windows Forms Print Dialog for rich text with accurate page preview and zooming
10 Mar 2018 by Joe Dillon
This article describes the security techniques required to create a secure offline password manager and how the Libsodium library has been used to achieve this. YAPM stores passwords with AES encryption and authenticates users with an Argon2 hash.
30 Dec 2007 by AGD-H
Knit is a Visual Studio add-in tool that allows a developer to apply multi-step patterns to solution and assembly meta-data.
26 Jan 2010 by #realJSOP
My most often used design pattern is the SWC pattern (Start Writing Code). It has served me well for almost 30 years.
26 Apr 2010 by George Henry 1954
Presents a class that facilitates high-usability binding of an ordinary TextBox to a numeric property
31 May 2010 by PSK_
On button click Try this. Process.Start(@"C:\YourFolder\"); The Process class exists in System.Diagnostics namespace.
1 Nov 2010 by Dave Paras
Copy following code in the click event of button.Don't forget to change the Location of button, next time...private void button1_Click(object sender, EventArgs e){ System.Windows.Forms.Label lbl = new Label(); lbl.Text = "Paras" lbl.Location = new System.Drawing.Point(0, 0); ...
31 Jan 2011 by Debojyoti Majumder
One more point I want to add.If you want to use LoadLibrary()/GetProcAddress() to use methods of .dll files you have use delegates.It's one of the ways to connect C# codes to C++ codes.
2 May 2011 by Olivier Levrey
Handle the Paint event for your panel, and put all your drawing code inside that handler.public Form1(){ InitializeComponent(); //handle the Paint event for the panel panel1.Paint += (sender, e) => { //put you drawing code here //and use...
22 May 2011 by Sergey Alexandrovich Kryukov
First of all, there is not such relationship as child-parent forms. [EDIT: There are MDIParent and MDIChildren, but this is not exactly the same thing. Also, I don't think we discuss MDI. Thanks to CS2011 who pointed out that relationship between forms in case of MDI.] There are Owned...
27 Jul 2011 by Sergey Alexandrovich Kryukov
Totally wrong approach! I agree with Griff. Your problem is fairly simple.Store text password in your database. Do it in hashed form using some cryptographic hash function, see http://en.wikipedia.org/wiki/Cryptographic_hash_function[^]. Use one of the functions from the SHA family, see...
12 Sep 2011 by Kim Togo
If you want to use TCP connection, then there is NO broadcast. TCP[^] is a point to point protocol.Check out UDP[^].
20 Nov 2011 by Bernhard Hiller
That's far too obscure.All you need to do is store a reference to the TabPage instance which was removed from the TabPages collection of the TabControl. You may use the form where the TabControl is placed for that purpose.You could also create your own TabControl which has an extra property...
20 Dec 2011 by Giorgi Dalakishvili
Bugs in System.Diagnostics.Process Class
26 Jan 2012 by hoernchenmeister
Hi all,Our application consists of several solutions. It uses MEF to plugin functional parts, that is all fine.I now try to find a way to share resources across all of those projects.Currently I create a dll containing a public resource file hosting images I need in all of my other...
22 Mar 2012 by Sergey Alexandrovich Kryukov
I would like to add to the correct answer by Shahin. Using WaitOne if free from the problems of thread suspensions. If an instance of an event wait handle is not set, the calling thread waits in a special wait state. OS switches the calling thread off and do not schedule it back to execution...
29 Apr 2012 by OriginalGriff
Probably not, from your description.A TextBox only holds Text - strings, and sorting is not one of it's features.However, assuming your TextBox is multiline, it would be possible to put them into the TextBox in sorted order:struct MyStruct : IComparable { public string...
26 Jun 2012 by Wonde Tadesse
Have a look these articles.1.Distributed transactions and TransactionScope [how to get it?][^]2.Entity Framework & Transactions[^]3.TransactionScope and DataAdapters[^]4.Handling transactions in .Net using TransactionScope[^]
6 Mar 2013 by wmjordan
Rendering text with OpenType fonts by P/Invoking GDI API in WinForm applications.
5 Oct 2014 by morzel
How to shoot paintball marker with relay, Arduino and .NET Winforms