Finding registered application for an extension.

One day my colleague asked me if there is a way to know the registered application to a specific extension, or how OS executes Notepad when user double clicks on any txt files. Here is my finding over it.

RichTextBox without Image

One of my friend asked me if there is a way that could prevent Images being pasted in the RichTextBox control, so I did a little code that allows RichTextBox control not to include Images. The solution to this problem is very simple just override the OnKeyDown event and check if the clipboard contains data [...]

Getting information string from enum

The Idea came while I was writing a wrapper for PE file structure early this year that was even before I ever started writing bog. Loads of Enum has to be provided with their information. The solution was simple, attach a custom attribute to each member of the Enum and later retrieve them using reflection. [...]

7-zip wrapper, Extracting password protected file

Recently there has been a 7-zip C# wrapper library in codeproject.com written by Eugene Sichkar. The author has done a tremendously great job he deserves a thank. By default user can not simply use the native 7z.dll directly into the C# project this is because of the incomplete COM interfaces implementations in 7-Zip code. So [...]

Switch Builder

I had to write a switch case for an Enum that contains huge amount of members. Writing each case with hitting the keyword is frustrating and time consuming. So I wrote a little code that builds a switch case for every member of Enum in an Assembly. The Logic behind the scene is extremely simple. [...]

Glassy Control

I was fiddling with panel appearance as I wanted it to have a Glassy effect. I don’t know if I got it exactly what I wanted but the result somehow looks appealing. You can also play with it especially into Rectangles for better results (well, don’t know if it makes).

IComparer How to

Sometimes, when sorting real object life no longer remains easier as it is whilst making sort operation in simple data types. Consider a following example, you are about the sort cars from its collection. How do you do this? There is in fact no operator like <, >, == that meets your all requirements unless [...]

Creating Numeric TextBox

DotNet 2.0 by default doesn’t provide an option for TextBox control that only contains numeric character. But creating such control requires trivial efforts.

Follow

Get every new post delivered to your Inbox.