-
Recent Posts
-
Recent Comments
- RodStephens on Change a DataGridView entry when the user double-clicks a cell in C#
- Let the user save an image of a smooth curve in C# - C# HelperC# Helper on Get the image of a control or form, or a form’s client area in C#
- RodStephens on Change a DataGridView entry when the user double-clicks a cell in C#
- NIKOS on Change a DataGridView entry when the user double-clicks a cell in C#
- RodStephens on Change a DataGridView entry when the user double-clicks a cell in C#
Archives
- December 2019
- November 2019
- October 2019
- September 2019
- August 2019
- July 2019
- June 2019
- May 2019
- April 2019
- March 2019
- February 2019
- January 2019
- December 2018
- November 2018
- October 2018
- September 2018
- August 2018
- July 2018
- June 2018
- May 2018
- April 2018
- March 2018
- February 2018
- January 2018
- December 2017
- November 2017
- October 2017
- September 2017
- August 2017
- July 2017
- June 2017
- May 2017
- April 2017
- March 2017
- February 2017
- January 2017
- December 2016
- November 2016
- October 2016
- September 2016
- August 2016
- July 2016
- June 2016
- May 2016
- April 2016
- March 2016
- February 2016
- January 2016
- December 2015
- November 2015
- October 2015
- September 2015
- August 2015
- July 2015
- June 2015
- May 2015
- April 2015
- March 2015
- February 2015
- January 2015
- December 2014
- November 2014
- October 2014
- September 2014
- August 2014
- July 2014
- June 2014
- May 2014
- February 2014
- January 2014
- December 2013
- October 2013
- August 2013
- June 2013
- December 2012
- September 2012
- July 2012
- June 2012
- November 2011
- May 2011
- April 2011
- February 2011
- December 2010
Categories
- .NET
- 3D
- 3D graphics
- ADO.NET
- algorithms
- animation
- API
- arrays
- attributes
- audio
- books
- C#
- C# programming
- calculations
- challenges
- classes
- clipboard
- coding
- combinatorics
- console
- controls
- cryptography
- curve fitting
- database
- debugging
- dialogs
- directories
- Drag and Drop
- drawing
- drawings
- enums
- Event
- events
- example program
- Excel
- extension methods
- extensions
- files
- finance
- fonts
- formatting
- forms
- fractals
- ftp
- games
- GDI+
- generic
- geometry
- globalization
- graphics
- html
- IDE
- image processing
- inheritance
- interfaces
- internationalization
- internet
- interoperability
- LINQ
- lists
- localization
- mathematics
- memory
- menus
- MessageBox
- methods
- miscellany
- multimedia
- network
- Office
- OOP
- operators
- parsing
- performance
- phone
- PowerPoint
- printers
- printing
- productivity
- programs
- puzzles
- recursion
- reflection
- registry
- regular expressions
- serialization
- settings
- SQL
- stories
- strings
- syntax
- system
- threading
- three-dimensional graphics
- tips
- tools
- transformations
- Uncategorized
- user interface
- variables
- VBA
- web
- Windows Forms programming
- WMI
- Word
- wpf
- XAML
- XML
Meta
Monthly Archives: September 2017
Draw a picture-filled histogram in C#
The example Make a simple histogram in C# shows how to draw a histogram. This example shows how to fill the histogram’s bars with pictures. The following TileRectangle method fills a rectangle with an image. // Tile an area from … Continue reading
Write values in the Registry in C#
The example Read Registry values (to get the desktop icon size) in C# shows how to read values from the Registry. This example shows how to write values into the Registry and uses that ability to refresh the desktop icons … Continue reading
Read Registry values (to get the desktop icon size) in C#
To make using Registry methods easier, this example defines a RegistryTools class that contains static methods for interacting with the Registry. The following code shows the GetRegistryValue method. // Get a registry value. public static object GetRegistryValue(RegistryKey hive, string subkey_name, … Continue reading
Posted in registry, system
3 Comments
Linkback to the Secret Santa Problem
Tom left a comment to my post Calculate the number of secret Santa permutations in C#. He used that example to build a site in JavaScript explaining how the algorithm works. It’s a pretty cool little page. Drop by and … Continue reading
Define custom exception classes in C#
The example Throw a standard exception in C# explains how to throw exceptions to tell the program about unexpected errors. The example See a hierarchy of exception classes for use in C# lists some useful exception classes. But what if … Continue reading
See a hierarchy of exception classes for use in C#
The example Throw a standard exception in C# explains how to throw exceptions to indicate a problem in a program. Throwing an exception is easiest if you can find an existing exception class that correctly represents your situation. The following … Continue reading
Throw standard exceptions in C#
The example Use try catch blocks to protect against unexpected errors in C# explains how to catch an exception and briefly mentions that you can use the throw statement to throw your own exception. This example shows how to throw … Continue reading
Posted in coding
Tagged C#, C# programming, coding, example, example program, exception, exception classes, exception handling, exceptions, try catch, try catch block, Windows Forms programming
2 Comments
Make a dice-rolling simulation in C#
This example performs a simulation of rolling two six-sided dice. It’s related to my book Interview Puzzles Dissected, which includes several examples that involve rolling dice. When you enter a number of trials and click Roll, the program uses the … Continue reading
Posted in algorithms, graphics, mathematics
Tagged algorithms, C#, C# programming, dice rolls, die rolls, example, example program, graphics, mathematics, probability, simulation, statistics, Windows Forms programming
Leave a comment
Tile a PictureBox in C#
If you set a form’s BackgroundImageLayout property Tile, then the control fills itself with copies of its background image. Strangely the PictureBox control does not have a corresponding Tile property. This example shows one way you can tile images on … Continue reading
Posted in drawing, graphics, image processing
Tagged C#, C# programming, drawing, example, example program, graphics, image processing, picture box, PictureBox, TextureBrush, tile, tile image, Windows Forms programming
Leave a comment
Use a symbiote to graphically select hours in C#
This example modifies the previous example Graphically select hours in C# so it uses a symbiote class. That example shows how to use a PictureBox to let the user select a range of hours. If you want to let the … Continue reading
Posted in controls, graphics, user interface
Tagged C#, C# programming, controls, example, example program, graphics, hours, select hours, select time, symbiote, time, user interface, Windows Forms programming
1 Comment