Monthly Archives: July 2020

Use VBA code to pick random cells from a filtered selection in an Excel workbook

This example shows how you can use VBA code to pick random cells in an Excel workbook when the selected cells are filtered. The post Use VBA code to pick random cells from the currently selected cells in an Excel … Continue reading

Posted in Excel, VBA | Tagged , , , , , , , , , , | Leave a comment

Make multi-image icons from files in C#

The post Make multi-image icon files in C# showed how to create several bitmaps at runtime and then used them to create multi-image icons in C#. This example lets you load multiple saved image files and use them to create … Continue reading

Posted in drawing, files, graphics | Tagged , , , , , , , , , | Leave a comment

Make multi-image icon files in C#

The most interesting thing about icon files is that they can contain several images with different sizes. When a program needs to display the icon, it can pick the size that is appropriate. For example, Windows 10 displays icons in … Continue reading

Posted in drawing, files, graphics | Tagged , , , , , , , , , | 1 Comment

Use command line arguments to open files in C#

Whenever a C# program starts, it receives command line arguments. You can use those arguments to let your program open files that are associated with the program. For example, when you double-click a .doc or .docx file, Microsoft Word opens … Continue reading

Posted in serialization, system | Tagged , , , , , , , | Leave a comment

Make a digital clock in C#

This example uses the techniques described in the example Draw LED-style letters in C# to draw a digital clock. That earlier example showed one way to draw LED-style letters. This example simply uses the LedText class from that post to … Continue reading

Posted in drawing, graphics | Tagged , , , , , , , , | Leave a comment

Draw LED-style letters in C#

Every now and then I’ve had the urge to write a digital clock program, and to do that, I need to be able to draw LED-style letters. (Some things are practically a right of passage for programmers. Writing a program … Continue reading

Posted in drawing, graphics | Tagged , , , , , , , | 1 Comment

Use Microsoft Print to PDF to create a PDF file in C#

This example shows one way that you can make a C# program create a PDF file. It’s super easy. (I haven’t posted any easy examples for a while, so this one makes a refreshing change.) Selecting the Printer In a … Continue reading

Posted in drawing, graphics, printing | Tagged , , , , , , , , | Leave a comment

Use menu commands with shortcuts to save and restore user-drawn polygons in C# and WPF

The example Let the user edit polygons in WPF and C# shows how to let the user draw and edit polygons in WPF. This example shows how you can let the user save and restore those polygons. While I was … Continue reading

Posted in drawing, graphics, wpf | Tagged , , , , , , , , , , , , | Leave a comment

Pingback: Code Project post “Clipping Plane in WPF 3D”

The Code Project post Clipping Plane in WPF 3D by charles922 references a couple of my WPF 3D posts. His post explains several WPF 3D concepts including; Manger sponges (refers to my post Use a dictionary to draw a 3D … Continue reading

Posted in 3D, 3D graphics, algorithms, books, drawing, graphics, mathematics, wpf, XAML | Tagged , , , , , , , , , , , , , , | Leave a comment

Sprialize an image in C#

This example shows how to spiralize an image. By spiralize I mean shade pieces of the picture with different colors so the colored areas for a spiral as shown in the picture. This could be a difficult problem. Fortunately I’ve … Continue reading

Posted in algorithms, drawing, graphics, image processing, mathematics | Tagged , , , , , , , , , , , | Leave a comment