This static method reduces an image with a transparant background to the minimal canvas needed. This code is part of my graphics processing library (PDrawing) and is hereby donated to the public domain. This process is best performed in a pre-process or background processing way, since it may take several seconds to process a large […]
Category: C#
Handle your thread errors
If you use Task.Factory.StartNew or one of it’s likes a lot, you may found yourself in the odd situation that exceptions from background threads either get delayed or do not appear at all. This behaviour is rather well described here including special conditions such as backgroundthreads started by other background threads. The long story short, […]
Populating a DX Treelist control from code or data
These samples will show the basic handling of the treelist control, to create a structure and react to clicks by the user. Used in this example is the treelist control from the DevExpress suit, but you can apply the same technique to basicaly any treelist control with minimal changes. The first example shows how to […]
Recursion revisited: Let’s call it self-calling-code
In the days of Z80 and 6502 programming in low memory systems self modifying code was quite common. Not only was it extremely efficient space and speed wise, it often was the only real way to get things done in systems with nothing but a few kb of memory. Explaining the concept of self modifying […]
Writing a context menu outlook addin
There is a sizable amount of documentation around about writing outlook addins, but few complete samples that cover the basics, and only the basic. Documentation snippets are great to get started, full blown applications are good if you dig around in addins daily. This snippet covers the middle ground: It is (the) complete framework you […]
Converting nested objects from and to JSON, the basics
Objective Converting a nested data class to and from JSON, using the NewtonSoft JSON library. Baseline JSON is a text like format that can easily be created in a number of ways. However, you should try to restrain the reflex to simply use a stringbuilder for small operations, since these things tend to grow and […]
ASP.NET Webforms, MVC & DevExpress: delete confirmation on a gridview
Standard ASP.NET GridView with ASP:Button Standard ASP.NET GridView with DevExpress ASPxButton MVC GridView, using a table to display your data