Creating a scrollable and zoomable image viewer in C# Part 1
A newer version of this code is now available.This is the first part in a series of articles that will result in a component for viewing an image. The final component will support zooming and...
View ArticleCreating a scrollable and zoomable image viewer in C# Part 2
A newer version of this code is now available.In the second part of our Creating a scrollable and zoomable image viewer in C# series we will update our component to support automatic scrolling when...
View ArticleCreating a scrollable and zoomable image viewer in C# Part 3
A newer version of this code is now available.After part 2 added scrolling support, we are now going to extend this to support keyboard scrolling and panning with the mouse.Design supportIn order to...
View ArticleCreating a scrollable and zoomable image viewer in C# Part 4
A newer version of this code is now available.In the conclusion to our series on building a scrollable and zoomable image viewer, we'll add support for zooming, auto centering, size to fit and some...
View ArticleCreating a trackback handler using C#
Cyotek.com runs on its own custom CMS/blog engine developed in ASP.NET MVC 1.0, which has a number of advantages and disadvantages. One of these disadvantages is no automatic support for some common...
View ArticleComparing the properties of two objects via Reflection and C#
As part of the refactoring I was doing to the load code for crawler projects I needed a way of verifying that new code was loading data correctly. As it would be extremely time consuming to manually...
View ArticleUsing the XmlReader class with C#
Some of the project files created by Cyotek Sitemap Creator and WebCopy are fairly large and the load performance of such files is poor. The files are saved using a XmlWriter class which is nice and...
View ArticleMVC actions, AcceptVerbs, HEAD requests and 404 errors
When running Sitemap Creator on the development version of cyotek.com, we found all links pointing to articles returned a 404 status code when crawling was attempted. But if same URL was copied into a...
View ArticleCreating a WYSIWYG font ComboBox using C#
This article shows how to use the built in ownerdraw functionality of a standard Windows Forms ComboBox control to display a WYSIWYG font list.Setting up the controlTo start, we'll create a new class,...
View ArticleEnabling shell styles for the ListView and TreeView controls in C#
For those who remember the Common Controls OCX's featured in Visual Basic 5 and 6, there was one peculiarity of these. In Visual Basic 5, the Common Controls were linked directly to their shell...
View ArticleMigrating from Visual SourceSafe to Subversion
For years now, we've used Microsoft Visual SourceSafe (VSS) for our source code control, but given that Microsoft dropped support for it some time ago in favour of Team Foundation Server, we've decided...
View ArticleImporting a SourceSafe database into Subversion
In my previous article on migrating a VSS database into SVN, I hadn't tried importing a VSS database into an existing repository, which is something I found the original code couldn't handle.I rewrote...
View ArticleCSS Syntax Highlighting in the DigitalRune Text Editor Control
For projects where I need some form of syntax highlighting, I tend to use the open source DigitalRune Text Editor Control which is a modified version of the text editor used in SharpDevelop. While it...
View ArticleDetecting if a given font style exists in C#
In a previous article, Creating a WYSIWYG font ComboBox using C#, there is a hacky bit of code which uses a try catch block to handle processing when a given font style doesn't exist. This article...
View ArticleConvert a PDF into a series of images using C# and GhostScript
An application I was recently working on received PDF files from a webservice which it then needed to store in a database. I wanted the ability to display previews of these documents within the...
View ArticleExtending the ImageBox component to display the contents of a PDF file using C#
In this article, I'll describe how to extend the ImageBox control discussed in earlier articles to be able to display PDF files with the help of the GhostScript library and the conversion library...
View ArticleDetecting if an application is running as an elevated process, and spawning a...
Recently I was writing some code to allow a program to register itself to start with Windows for all users. On Windows 7 with User Account Control (UAC) enabled, trying to write to the relevant...
View ArticleAngelCode bitmap font parsing using C#
Updated 10Jun2015: Code is now available on GitHub, any updates can be found thereWhile writing some bitmap font processing for an OpenGL project, I settled on using AngelCode's BMFont utility to...
View ArticleConverting 2D arrays to 1D and accessing as either 2D or 1D
While working on a recent gaming project, I was originally using 2D arrays to store information relating to the different levels in the game. But when it came to loop through the contents of these...
View ArticleCreating an image viewer in C# Part 5: Selecting part of an image
A newer version of this code is now available.Part 4 of this series (by far the most popular article on cyotek.com) was supposed to be the end, but recently I was asked if was possible to select part...
View Article