-
Recent Posts
-
Recent Comments
- sidereal on Let the user draw polygons, move them, and add points to them in C#
- RodStephens on Let the user draw and move line segments snapping their positions to a snap grid in C#
- RodStephens on Let the user draw polygons in C#
- Javier on Let the user draw polygons in C#
- Javier on Let the user draw and move line segments snapping their positions to a snap grid in C#
Archives
- 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
- tips
- tools
- transformations
- Uncategorized
- user interface
- variables
- VBA
- web
- Windows Forms programming
- WMI
- Word
- wpf
- XAML
- XML
Meta
Monthly Archives: November 2014
Remove the hyperlinks from a Word document in C#
This example shows how you can remove the hyperlinks from a Word document. When you select text on a web page and paste it into a Word document, the result often contains hyperlinks that you don’t want. (Actually after you … Continue reading
Posted in files, Office, Word
Tagged C#, C# programming, example, example program, files, hyperlinks, Office, remove hypelinks, Windows Forms programming, Word, Word document, Word.Application
Leave a comment
Find the tangent lines between a point and a circle in C#
Finding the tangent lines between a point and a circle isn’t too hard if you’re familiar with the example Determine where two circles intersect in C#. Consider the figure on the right. R is the radius of the circle. You … Continue reading
Posted in algorithms, geometry, graphics, mathematics
Tagged algorithms, C#, C# programming, circle, circle-line tangent, example, example program, geometry, graphics, line, line-circle tangent, mathematics, tangent, Windows Forms programming
1 Comment
Print a form or control in C#
This example shows how you can print a form or control in a C# program. Way back in the days of Visual Basic 6, there was a PrintForm method. It simply grabbed an image of the form and printed it. … Continue reading
Posted in controls, forms, printing
Tagged C#, C# programming, controls, example, example program, forms, print control, print control image, print form, print form image, PrintForm, printing, Windows Forms programming
Leave a comment
Force garbage collection in C#
This example shows how you can force garbage collection in C#. The .NET languages use a garbage collection scheme of memory management. There are a few weird details, but the basic process is this. When the application is running low … Continue reading
Handle DataGridView errors in C#
This example shows how you can handle DataGridView errors when you modify the data in the DataGridView control. The example Build a DataTable and bind it to a DataGridView in C# shows how to use a DataGridView control to display … Continue reading
Build a DataTable and bind it to a DataGridView in C#
This example shows how you can build a DataTable and bind it to a DataGridView control. A DataTable is an in-memory representation of a relational database table. It can define columns of particular data types and even enforce uniqueness and … Continue reading
Posted in controls, database
Tagged binding, C#, C# programming, controls, data binding, database, DataGridView, DataTable, example, example program, in-memory DataTable, Windows Forms programming
13 Comments
Bind a DataGrid to a DataSet holding multiple tables at runtime in C#
This example shows how you can bind a DataGrid control to a DataSet loaded from an MDB file at runtime. When the form loads, the following code builds the DataSet and binds it to the form’s DataGrid control. // The … Continue reading
Posted in controls, database
Tagged C#, C# programming, controls, database, DataGrid, DataSet, example, example program, OLE DB, OleDbCommandBuilder, Windows Forms programming
11 Comments
Draw a labeled line graph that displays value tooltips in C#
This (fairly complicated) example maps between several different coordinate systems: The main graph is mapped from a coordinate space where 1900 ≤ x ≤ 2010 and 0 ≤ y ≤ 8000 to an area on the screen. Each data point … Continue reading
Posted in drawing, graphics, mathematics, transformations
Tagged C#, C# programming, drawing, example, example program, graph, graphics, line graph, mathematics, rotated text, strings, tooltips, transformations, Windows Forms programming
1 Comment
Map points between coordinate systems in C#
This example shows how you can easily map points between different coordinate systems. The Graphics object provides transformations that let you scale, translate, rotate, skew, and otherwise transform graphics as you draw them. One important use of these transformations is … Continue reading
Posted in algorithms, drawing, graphics, transformations
Tagged algorithms, C#, C# programming, coordinate systems, drawing, example, example program, graphics, map, mapping, Matrix, ResetTransform, scale, ScaleTransform, transform, transformations, translate, TranslateTransform, Windows Forms programming
3 Comments