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.
Filed under: C# | Tagged: C# | 1 Comment »
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.
Filed under: C# | Tagged: C# | 1 Comment »
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 [...]
Filed under: C# | Tagged: Controls | 1 Comment »
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. [...]
Filed under: C# | Tagged: C#, Extension Method, Reflection | Leave a Comment »
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 [...]
Filed under: C# | 1 Comment »
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. [...]
Filed under: C# | Tagged: C#, Reflection | 1 Comment »
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).
Filed under: C# | Tagged: Glassy Effect | Leave a Comment »
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 [...]
Filed under: C# | Tagged: IComparer | Leave a Comment »
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.
Filed under: C# | Leave a Comment »