Building a large text file editor – Part II

In the previous post I created a class that was going to be used as an interface between a large file editor and the file on the disk. Since then I’ve been implementing the user interface and, obviously, the RevisionStream also needed some readjustment. Here are some major changes that were done: – detecting encoding…

0

Building a large text file editor – Part I

The purpose of this series of two blog posts is to illustrate how an editor for large files can be implemented. The first part will address the model behind the editor whereas the second part will include an actual UserControl that allows users to view and edit large files. The basic idea behind a large…

2

Back to school – Office art geometry

Let’s start off with the following observation- the following two shapes have the same Left and Top coordinates:   What’s different is obviously the rotation. What Office saves for a shape is the Left and Top coordinates together with a Rotation. So the Top coordinate, for instance, is not necessarily the uppermost part of a shape….

0

Using DDE in C# for Office automation

  Looking for some code samples how to pass DDE messages from a .NET program I found out that there‘s a great library already in place that facilitates working with DDE: the NDde project from Codeplex: http://ndde.codeplex.com/ However, I just needed to make one call and including a new DLL into my code would have…

0

Complex editing of XLSX files

  Editing Excel OpenXML documents using the OpenXML 2.0 SDK offers better performace and improved supportability compared to normal Office automation (e.g. VBA). There are also great examples on the Internet to get started: Office Open XML Formats: Inserting Values into Excel 2007 Cells. What I haven’t found until now is some clarifications as to…

0

Listing styles in Word document

  When dealing with Styles in Word you can never have too much control. This is when a listing of the existing styles and their descriptions helps a lot. Happily VBA provides a powerful way of getting details about a certain style through the Description member of the Style class. Based on this I’ve built…

0

Brushing up on the WPF and Windows 7 Jump Lists

  This is just a summary on the new Windows 7 features and how these can be implemented in .NET. There is plenty documentation on both Windows Presentation Foundation and the Windows 7 SDK but actually implementing a solution is a bit harder. So here we have it: a WPF application that create Jump Lists…

0

XML Highlight in RichTextBox

  Recently I’ve been looking for some piece of code that would perform XML highlighting in a Rich Text Box. The Internet provides several free samples and several commercial samples but I wasn’t really satisfied with what I found, mainly because it involved using an XMLTextReader object, which does not help for WYSWYG editing of…

14

Create metafile from icon and label

Going further on the Windows Metafile problematic from a previous post, I’ve created a sample code for illustration a pretty useful functionality from OLE. What the OLE function implemented here does is to generate a metafile with the icon and label for a specific file: The way to do this is: 1. Call SHGetFileInfo to…

0

DLL Injection

In a previous post, I was discussing the idea of adding more events to Excel by adding a window hook. Under the hood, the idea is that we can load a DLL in the Excel process simply by transforming that DLL into a COM add-in, which is automatically loaded by Excel. This post covers the…

2