How to use a ProgressBar with a Cancel button.


It’s the Easter long weekend here in Perth Western Australia all the shops are closed today, so I am at home catching up with some house work and blogging.

Well in this blog I am going to demonstrate how to create a Progress Dialog Box to show the progress of your process and allowing the user to cancel out of the process.

First what you need to do is create a new Windows Form Application project or download the project from here.


How to split multi page TIFF image file with C#

Few days ago at work, I have been assigned a job to write a tool to split a .tif file that contains multiple pages. So below I have some code snippets that demonstrates how to use the .NET Framework and C# to achieve this, and we don’t need to use any third party libraries.

1) First you need to create a new Console Project called SplitTIFF.

2) Add the System.Drawing assembly to your Reference folder in your project:

3) In your code add the System.Drawing and System.Drawing.Imaging namespace.

3) Add the following code in your Main method: