Tag Archives: example

Study a fascinating color illusion in C#

This example shows how you can generate a fascinating color illusion that tricks your brain trick into thinking that a black and white picture is actually colored. All of the pictures shown above are black and white. All except the … Continue reading

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

Print circles centered inside other closely packed circles in C#

This example shows how to print circles that are arranged densely in a hexagonal pattern. I needed that to make a cardboard sheet for arranging cupcakes to make a cupcake cake. The holes needed to be 1″ in radius and … Continue reading

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

Change a DataGridView entry when the user double-clicks a cell in C#

This post is in response to the following question: Respected Sir, I need help on how can i change the datagridview cell value by double click on that cell. Let say cell contain value ā€˜Nā€™ when i double click it … Continue reading

Posted in controls, database, user interface | Tagged , , , , , , , , | Leave a comment

Flow words around drop caps in C#

The example Flow blocks around obstacles for document layout in C# implements a document layout algorithm that flows blocks around obstacles. Moving from there to flowing words around obstacles is relatively simple. The following sections describe the main places where … Continue reading

Posted in algorithms, fonts, graphics, strings | Tagged , , , , , , , , , , , , | Leave a comment

Flow words around obstacles for document layout in C#

The example Flow blocks around obstacles for document layout in C# implements a document layout algorithm that flows blocks around obstacles. Moving from there to flowing words around obstacles is relatively simple. The following sections describe the two main places … Continue reading

Posted in algorithms, fonts, graphics, strings | Tagged , , , , , , , , , , , , | Leave a comment

Flow blocks around obstacles for document layout in C#

The following two document layout examples draw “illuminated” text by using an initial or drop cap. Draw different styles of “illuminated” text in C# Draw “illuminated” text in C# Martin asked how we could do something similar when the text … Continue reading

Posted in algorithms, fonts, graphics, strings | Tagged , , , , , , , , , , , , | 2 Comments

Serialize and deserialize multiple images in files in C#

The example Serialize and deserialize multiple images in C# showed how you can List<Image> into a memory stream and then deserialize stream to recover the images. This example shows how you can similarly serialize a list of images into a … Continue reading

Posted in database, files, serialization | Tagged , , , , , , , , , , , , , | 3 Comments

Serialize and deserialize multiple images in C#

This example shows how you can serialize and deserialize multiple images together in a single serialization. It also talks a bit about database design. (For more information about database design including this issue, see my book, Beginning Database Design Solutions.) … Continue reading

Posted in database, files, serialization | Tagged , , , , , , , , , , , , , | 1 Comment

Let the user drag pictures in a picture list in C#

The post Improve the picture list in C# showed how you can let the user add, remove ,and rearrange images in a picture list. To rearrange the list, the user right-clicks on a picture and selects Move Left or Move … Continue reading

Posted in controls, lists, user interface | Tagged , , , , , , , , | Leave a comment

Improve the picture list in C#

My post Make a picture list in C# explained how you can make a picture list that lets the user add, remove, and rearrange pictures. This post adds a small improvement. The previous example displayed images in PictureBox controls with … Continue reading

Posted in controls, lists, user interface | Tagged , , , , , , , , | 1 Comment