RBM Binary Image now displays barcode using Code39
Introduction
It’s been a while since I lost wrote on my blog yesterday one of my friends was asking me how to display Barcode in asp.net, There is a great open source code written by Bart De Smet which could return a bar code image from a bar code string you could see his article here I have just added to it one small option of whether or not to display the code under the bar code. The library returns an Image I thought of adding the display of bar code from the bar code string value, functionality to RBMBinaryImage would be cool.
Using the Code
The idea was simple since, the Code39 Library returns already an Image object so I only got it’s bytes and passed it to the ImageContent Property which is then rendered in the image. for more information on how the binary image display works in RBMBinaryImage please visit the post here. Again the usage of the control is still easy, to display the bar code you only need to set the PrintBarcode property to true, and pass the BarCodeValue the bar code as you could see below the DisplayThumbnail Property still is being applied on the bar code.
<Rbm:RbmBinaryImage ID="RbmBinaryImage2" runat="server" PrintBarcode="true"Â BarCodeValue='<%# Eval("BarCode") %>' DisplayThumbnail="true"Â Â ThumbnailSize="160"Â EmptyImageUrl="images/NoPhoto.JPG" />
I have made one change to the HttpHandler to be with the extension of the .ashx instead of the .rbm extension to be standard
<httpHandlers> <add verb="GET" path="__RbmImageHandler.ashx" type="RbmControls.RbmImageHandler"/> </httpHandlers>
Finally, you could find the code here
Uninstall Previous Version of .NET Application Automatically
Rbm Visual Studio Eye Friendly DarkTheme
Introduction
Recently I have passed through a very cool Theme For Visual Studio 2008 it’s called TaznimSaqib-DarkTheme I found it a very nice theme indeed and very comforting for my eyes so since I use Both Visual Studio 2008 and Visual Studio 2005 I decided to make a similar one for Visual Studio 2005. you could find a screenshot to the theme below
Setting the Theme in Visual Studio
For setting the theme click on tools -> Import and Export
Then select Import Selected Environment Settings, In the next page select save my current settings and press next. Then browser for the settings file that you could download from above. Then select next then finish.
Hope you enjoy the theme and you find it cool to use. Share your thoughts
Running Fiddler on LocalHost
Fiddler is an awesome tool for Web Debugging which logs all HTTP(S) traffic between your computer and the Internet. To run fiddler on your localhost you could simply place a “.” after the localhost e.g. http://localhost:4433/MySite/ => http://localhost.:4433/MySite/ Notice the “.” after localhost however sometimes this doesn’t work on vista so you could try either putting your computer name instead of localhost or the loop back IP e.g http://127.0.0.1.:4433/MySite The “.” is still there after the IP.
Hope you enjoy it, please share your thoughts
Deploying Custom Tool using a Setup Project
CustomToolDeploymentForVisualStudio.zip
Introduction
Making a custom tool work on the developers machine require several actions like placing keys in the registry and registering your DLL Library using the regasm command. This post will discuss the automation of this procedures using a setup project. for more information on making your own custom tool visit my post Building a Custom Tool Generator For Visual Studio
Using the Code
First add a class in your CustomTool Library Project that inherits from the Installer class in this class override two methods the first is the Install Method the Second is the Uninstall method.
To Get the regasm.exe path you could use the InteropServices.RuntimeEnvironment class to get the runtime directory of the .NET framework. Then you need to get the assembly location. After that you could simply start the process of the regasm and pass to it the /codebase parameter and the path of the library.
public override void Install(System.Collections.IDictionary stateSaver)
{
base.Install(stateSaver);
string regasmPath = System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory() + @"regasm.exe";
string componentPath = base.GetType().Assembly.Location;
System.Diagnostics.Process.Start(regasmPath, "/codebase \"" + componentPath + "\"");
}
To uninstall remove the component registeration by the /unregister parameter
public override void Uninstall(System.Collections.IDictionary savedState)
{
base.Uninstall(savedState);
string regasmPath = System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory() + @"regasm.exe";
string componentPath = base.GetType().Assembly.Location;
System.Diagnostics.Process.Start(regasmPath, "/unregister \"" + componentPath + "\"");
}
The Setup Project
Now make a new setup project and add the output of the CustomTool Library to it. Then Right Click the setup project and select view then select custom actions.
Then Add the CustomTool Project Output to the Install and Uninstall Sections as in the image below.

ok now you need to add the registry values right click on the setup project and then View then select Registry To add the Needed Registry Values follow the structure in the figure below.

Share your Thoughts
Now all you have to do is just build the setup project
and you will have a setup deployment for your custom tool.
please share your thoughts and feel free to drop any comments. Hope you enjoy the project.


