Winforms code snippets (72)
How to open message box
Published: 1. February 2012 | Updated: 1. February 2012Categories: Winforms WPF
Tags: C# UI Windows Winforms WPF
How to get battery information
Published: 20. November 2011 | Updated: 20. November 2011Categories: Hardware
Tags: C# Hardware Windows Winforms
How to find out whether Windows UI effects are enabled
Published: 19. November 2011 | Updated: 19. November 2011Categories: Windows
Tags: C# UI Windows Winforms WPF
How to find out whether program is running in a remote session
Published: 19. November 2011 | Updated: 19. November 2011Categories: Win32 Windows
Tags: C# Win32 Windows Winforms WPF
How to change cursor
Published: 14. December 2008 | Updated: 10. November 2011Categories: Winforms
Tags: C# UI Windows Winforms
How to get distance between two points
Published: 13. December 2008 | Updated: 5. November 2011Categories: GDI Math
Tags: C# GDI Math Winforms WPF
How to find out whether form is active
Published: 27. October 2011 | Updated: 27. October 2011Categories: Winforms
Tags: C# UI Winforms
How to hide windows form
Published: 27. October 2011 | Updated: 27. October 2011Categories: Winforms
Tags: C# UI Winforms
How to get information about all monitors
Published: 27. October 2011 | Updated: 27. October 2011Categories: Hardware
Tags: C# Hardware Windows Winforms
How to get monitors count
Published: 27. October 2011 | Updated: 27. October 2011Categories: Hardware
Tags: C# Hardware Windows Winforms
How to list all open forms in Winforms
Published: 27. October 2011 | Updated: 27. October 2011Categories: Winforms
Tags: C# UI Winforms
How to launch custom process
Published: 13. December 2008 | Updated: 27. October 2011Categories: Processes
Tags: C# Windows Winforms
How to close a form in Winforms
Published: 27. October 2011 | Updated: 27. October 2011Categories: Winforms
Tags: C# UI Winforms
How to minimize form in Winforms
Published: 27. October 2011 | Updated: 27. October 2011Categories: Winforms
Tags: C# UI Winforms
How to get handle of a window
Published: 27. October 2011 | Updated: 27. October 2011Categories: Winforms
Tags: C# Winforms
How to load xml to DataSet
Published: 15. January 2009 | Updated: 26. October 2011Categories: XML
Tags: C# Webforms Winforms XML
How to manually create and fill DataTable
Published: 14. December 2008 | Updated: 26. October 2011Categories: Databases Winforms
Tags: C# SQL Webforms Winforms WPF
How to read a windows registry key
Published: 13. December 2008 | Updated: 26. October 2011Categories: Registry
Tags: C# Windows Winforms
How to get current Windows user
Published: 13. December 2008 | Updated: 26. October 2011Categories: Authorization
Tags: C# Security Windows Winforms
How to get screen size
Published: 12. January 2009 | Updated: 26. October 2011Categories: GDI Hardware
Tags: C# GDI Hardware Windows Winforms
How to open url address in browser
Published: 13. December 2008 | Updated: 26. October 2011Categories: Network Processes
Tags: C# Network Windows Winforms
How to get current process
Published: 13. December 2008 | Updated: 26. October 2011Categories: Processes
Tags: C# Windows Winforms
How to convert Color to hex code
Published: 21. October 2011 | Updated: 26. October 2011Categories: Colors
Tags: C# Colors Conversion Winforms WPF
How to get color from hex code
Published: 21. October 2011 | Updated: 26. October 2011Categories: Colors
Tags: C# Colors Conversion Winforms WPF
How to get color from ARGB
Published: 24. October 2011 | Updated: 26. October 2011Categories: Colors
Tags: C# Colors Conversion Winforms WPF
How to get color from name
Published: 24. October 2011 | Updated: 26. October 2011Categories: Colors
Tags: C# Colors Conversion Winforms WPF
How to get system colors
Published: 24. October 2011 | Updated: 24. October 2011Categories: Windows
Tags: C# Colors Windows Winforms WPF
How to get predefined colors
Published: 24. October 2011 | Updated: 24. October 2011Categories: Framework
Tags: C# Colors Winforms WPF
How to get color input from user using ColorDialog
Published: 14. December 2008 | Updated: 21. October 2011Categories: GDI Winforms
Tags: C# Colors Winforms
How to disable mouse in Winforms
Published: 14. October 2011 | Updated: 14. October 2011Categories: Winforms
Tags: C# Winforms
How to hide form from taskbar and Alt+TAB
Published: 22. January 2009 | Updated: 12. October 2011Categories: Winforms
Tags: C# Windows Winforms
How to get value from AppSettings in App.config or Web.config
Published: 9. October 2011 | Updated: 9. October 2011Categories: Framework
Tags: C# Console Winforms WPF
How to get connection string from App.config or Web.config
Published: 9. October 2011 | Updated: 9. October 2011Categories: Databases Framework
Tags: C# SQL Winforms WPF
How to get name of application
Published: 9. October 2011 | Updated: 9. October 2011Categories: Reflection
Tags: C# Console Reflection Winforms WPF
How to get build number
Published: 9. October 2011 | Updated: 9. October 2011Categories: Reflection
Tags: C# Console Reflection Winforms WPF
How to get working directory / location
Published: 9. October 2011 | Updated: 9. October 2011Categories: Consoles Directories Winforms
Tags: C# Console Winforms WPF
How to exit application
Published: 9. October 2011 | Updated: 9. October 2011Categories: Consoles Winforms
Tags: C# Console Winforms
How to get command line for process
Published: 9. October 2011 | Updated: 9. October 2011Categories: Framework
Tags: C# Console Winforms
How to get focused control
Published: 27. January 2009 | Updated: 9. October 2011Categories: Win32 Winforms
Tags: C# Controls Win32 Winforms
How to detect save mode in Windows
Published: 26. January 2009 | Updated: 26. September 2011Categories: Windows
Tags: C# Windows Winforms
How to convert handle to form
Published: 15. January 2009 | Updated: 26. September 2011Categories: Unsafe Code Winforms
Tags: C# Controls Windows Winforms
How to render high quality antialiased text
Published: 27. January 2009 | Updated: 26. September 2011Categories: GDI
Tags: C# GDI Text Winforms
How to show/hide mouse cursor
Published: 22. January 2009 | Updated: 22. January 2009Categories: Winforms
Tags: C# Windows Winforms
How to send email using default mail client
Published: 22. January 2009 | Updated: 22. January 2009Categories: Network
Tags: C# Network Windows Winforms
How to choose font using FontDialog
Published: 21. January 2009 | Updated: 21. January 2009Categories: Winforms
Tags: C# Winforms
How to show help file
Published: 21. January 2009 | Updated: 21. January 2009Categories: Winforms
Tags: C# Controls Winforms
How to show online help
Published: 21. January 2009 | Updated: 21. January 2009Categories: Winforms
Tags: C# Controls Winforms
How to show help pop-up window
Published: 21. January 2009 | Updated: 21. January 2009Categories: Winforms
Tags: C# Controls Winforms
How to save / load RTF document using RichTextBox
Published: 21. January 2009 | Updated: 21. January 2009Categories: Winforms
Tags: C# Text Winforms
How to keep a form always on top
Published: 21. January 2009 | Updated: 21. January 2009Categories: Winforms
Tags: C# Winforms
How to get active MDI child
Published: 21. January 2009 | Updated: 21. January 2009Categories: Winforms
Tags: C# Winforms
How to draw image from file
Published: 21. January 2009 | Updated: 21. January 2009Categories: GDI
Tags: C# GDI Winforms
How to choose folder using FolderBrowserDialog
Published: 21. January 2009 | Updated: 21. January 2009Categories: Directories Winforms
Tags: C# Windows Winforms
How to draw centered text
Published: 21. January 2009 | Updated: 21. January 2009Categories: GDI
Tags: C# GDI Text Winforms
How to get image encoder/decoder by image format
Published: 20. January 2009 | Updated: 20. January 2009Categories: GDI
Tags: C# GDI Winforms
How to get installed image decoders
Published: 20. January 2009 | Updated: 20. January 2009Categories: GDI
Tags: C# GDI Winforms
How to get installed image encoders
Published: 20. January 2009 | Updated: 20. January 2009Categories: GDI
Tags: C# GDI Winforms
How to render buffered graphics
Published: 20. January 2009 | Updated: 20. January 2009Categories: GDI
Tags: C# Controls GDI Winforms
How to send keys to application
Published: 8. January 2009 | Updated: 8. January 2009Categories: Winforms
Tags: C# Windows Winforms
How to stop playing background sound
Published: 8. January 2009 | Updated: 8. January 2009Categories: Winforms
Tags: C# Media Windows Winforms
How to play sound in C#
Published: 8. January 2009 | Updated: 8. January 2009Categories: Winforms
Tags: C# Media Windows Winforms
How to get image from clipboard
Published: 8. January 2009 | Updated: 8. January 2009Categories: GDI Windows
Tags: C# GDI Windows Winforms
How to get currently active form for application
Published: 8. January 2009 | Updated: 8. January 2009Categories: Winforms
Tags: C# Controls UI Winforms
How to flash form taskbar button
Published: 21. December 2008 | Updated: 21. December 2008Categories: Win32 Winforms
Tags: C# UI Win32 Windows Winforms
How to use console output in winforms
Published: 15. December 2008 | Updated: 20. December 2008Categories: Win32 Winforms
Tags: C# Console Win32 Windows Winforms
How to access control from different thread
Published: 15. December 2008 | Updated: 20. December 2008Categories: Threading Winforms
Tags: C# Controls Threading Winforms
How to create MDI form
Published: 18. December 2008 | Updated: 18. December 2008Categories: Winforms
Tags: C# Controls UI Winforms
How to set tooltip for control
Published: 18. December 2008 | Updated: 18. December 2008Categories: Winforms
Tags: C# Controls UI Winforms
How to create control and add to form on the fly
Published: 15. December 2008 | Updated: 15. December 2008Categories: Winforms
Tags: C# Controls UI Winforms
How to disable close 'x' button in winform
Published: 15. December 2008 | Updated: 15. December 2008Categories: Win32 Winforms
Tags: C# UI Windows Winforms
How to create file open dialog
Published: 14. December 2008 | Updated: 14. December 2008Categories: Winforms
Tags: C# File System UI Winforms
How to create file save dialog
Published: 14. December 2008 | Updated: 14. December 2008Categories: Winforms
Tags: C# File System UI Winforms





