Decompile a .NET DLL into a Visual Studio project

by Justin 26. April 2008 09:34

As a professional developer you will eventually have to view or edit some code that you do not have the original source to. The original source could've been lost, accidently deleted, or never given to you when it should've been. When you are in one of these situations try the following.

  1. Download Reflector, which allows you to open an assembly (i.e. DLL file) and view its contents. However, by default you can not modify or export the contents of the DLL. You will need Add-Ins to do that.
  2. Extract Reflector into a directory on your computer. I chose C:\Program Files\Reflector\ as my directory.
  3. Download the File Disassembler Add-In, which allows you to export the contents of the assembly into a Visual Studio project.
  4. Extract Reflector.FileDisassembler.dll from the zip and into to the same directory as your Reflector application.
  5. Open the Reflector application.
  6. Chose whichever version of .NET that you're currently using.
  7. Go to View > Add-Ins and click the Add... button.
  8. Double click Reflector.FileDisassembler.dll to selected it, then click Close.
  9. On Reflector's menu bar under Tools there's now an option called File Disassembler.
  10. Use File > Open to open the name of the assembly that you want to decompile. It will load in the left pane after the Microsoft assemblies.
  11. Click on the assembly's name once to select it.
  12. Go to Tools > File Disassembler to open up the file disassembler's pane. Tip: Close any other pane's that may be obstructing your view.
  13. Make sure you're okay with the Output Directory and you have your language of choice selected in Reflector. (i.e. C#, Visual Basic, etc.)
  14. Click the Generate button in the File Disassembler pane.
  15. Navigate to the directory that the DLL was decompiled to and enjoy!

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , ,

How to Run WebKit On Windows

by Justin 25. April 2008 02:05

So I've been noticing a buzz in the web dev community lately about a web browser called "WebKit. " It made some news recently when it tied with Opera as being one of the first browsers to pass the Acid 3 test.

Don't get too excited, it's just an open source version of Safari. Well, it's the rendering engine that Safari is built off of, which is apparently based on the same engine that's used by Konqueror. (Now there's a browser we haven't heard of in a while.) It seems that in order to "install" WebKit you basically have to run a script that uses an existing Safari install as its user interface. The install seems to be temporary.

Running Web Kit

  1. If you don't already have it installed, then download Safari and install it.
  2. After it's installed check out the Acid 3 test, and you'll see that Safari fails it (as of 4/24/2008).
  3. Download the latest build of WebKit.
  4. Extract the zip to your desktop.
  5. Double click the run-nightly-webkit.cmd script. The old MS-DOS console will open and will spit out a series of file updates.
  6. Safari will automatically launch, and even though it says it's Safari it's actually WebKit. Navigate to the Acid 3 test and you'll see that it passes it. Note that your original Safari install is unaffected.
 

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: ,

Add a Fade Effect to Your Forms

by Justin 6. April 2008 00:08

Forms are boring! Or are they? Make any form more interesting by morphing between your form's questions using mootools, a JavaScript framework. Just click the first link below and click "Next Question >>" to see the effect in action. Then click the second link to see what the page would look like if the user had JavaScript disabled.

Demo with JavaScript Enabled

Demo with JavaScript Disabled (Simulated)

Not only can this be used with a form, but with anything that you want to break up into steps, such as a wizard that guides the user through a list of new features for a product.

The technique I use is known as unobtrusive JavaScript, which means the page does not rely on the JavaScript to work. Rather, enabling JavaScript will result in some "bells and whistles," but if it's turned off the page is still 100% functional. My goal was to keep this script as simple as possible, so feel free to edit it and use it on any of your projects—free of charge or limitation.

The script basically works like this:

  1. Get all the questions, or steps, in the form.
  2. Dynamically add some navigation controls to move forward and backward for each question.
  3. Hide all the questions or steps, except for the first step.


Whenever a link is clicked an event is called to handle which step is faded in as the current step is faded out.

Download mootools script
Download fade effect script 

Note: Everything in the "options" section of the class is there to allow you to easily customize the script. The "initalize" section is basically a constructor for the class itself.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , ,

Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen