WordPress2Doc – How to convert WordPress articles into Word and PDF documents

WordPress2Doc is a small program I developed, that enables you to convert your WordPress articles into Word (docx) documents. In addition to the Word format (.docx) the PDF format (.pdf) is available as a target format. For the conversion, the program makes use of the WordPress export XML file and can convert the items inside the export file in one or both of the aforementioned formats.
Tip: The download link for WordPress2Doc is at the end of this article! Who needs no further information, can now confidently scroll to the bottom of the article.
How to convert WordPress articles into pdf and docx files
To convert your WordPress articles into .docx or .pdf format, the relevant articles must be exported from WordPress at first. This can be done at WordPress’ backend. Therefore open the administration page of your blog and navigate to the “Tools-> Export” menu in the WordPress backend.

How to change the size of a textbox in C#

I admit, the title sounds almost trivial. But on the second sight, it is not so easy to change the size of a TextBox control in C#, because a TextBox does not have the AutoSize property. For other controls you can set the AutoSize property to false and then change the height (height-property). For the TextBox control this is unfortunately not the case.
Nevertheless you can set the height of a TextBox by using a small workaround. The trick is as follows:

textBoxTest.Multiline = true;
textBoxTest.MinimumSize = new Size(150, 24);
textBoxTest.Size = new Size(150, 24);
textBoxTest.Multiline = false;

First you have to set the multiline property to true. Then you can adjust, according to your mood, the minimum-size and the size property to change the size of the TextBox. When you’re done, you set the Multiline property back to false. The TextBox maintains the set size just yet. It’s that simple
Who still wonders, why you should […]

How to search for users in Active Directory with C#

Last time I wrote about how you can reach the Active Directory search dialog in Windows 7. Today I’ll show you how to search comfortable for users in the Active Directory by using C#. The emphasis is on comfort, because there are quite a few articles on the subject in general, on the internet.
However, most of the shown methods/solutions are build exclusively around System.DirectoryServices.ActiveDirectory and the DirectorySearcher. But ever since .NET 3.5 it is also possible to search in the Active Directory much easier.
But let us come to the point. In the following example, I mostly use methods from the System.DirectoryServices.AccountManagement namespace. And here’s how:

//Create a shortcut to the appropriate Windows domain
PrincipalContext domainContext = new PrincipalContext(ContextType.Domain,
[…]

The best free .NET decompilers – the .NET Reflector alternatives

netreflectorToday I want to briefly highlight a few alternatives to Redgates .NET Reflector. Former I frequently used this tool, but since it costs money and there are good and useful free alternatives, this is no longer between my fingers.
The following parenthesis is for those who don’t know what’s meant by the term .NET Reflector/decompiler. All the other can read on below the following paragraphs.
What is a (. NET) decompiler?
.NET Reflector was the first CLI assembly browser. It can be used to inspect, navigate, search, analyze, and browse the contents of a CLI component such as an assembly and translates the binary information to a human-readable form. By default Reflector allows decompilation of CLI assemblies into C#, Visual Basic .NET, Common Intermediate Language and F# (alpha version). Reflector also includes a “Call Tree” that can be used to drill down […]

MD5 hashes in C# – benchmark and speed ​​optimization

For a current project I must generate a large number of MD5 hashes. I explicitly don’t want to discuss the meaning and security of MD5 hashes in this article, but rather concern myself with the question on how to generate MD5 hashes as fast as possible using C#.
The. NET Framework itself provides a class for creating MD5 hashes, which after the first attempts seemed a little slow to me. So I began to search for alternative classes and/or functions and came across a class of Syed Faraz Mahmood. His class is a manual implementation of the RFC 1321 (“The MD5 Message-Digest Algorithm”). The class can be downloaded for free on his blog.
The test environment
For the test I created six lists (List<int>) with many different numbers. Each with 1,000, 10,000, 50,000, 100,000, 1,000,000 and 10,000,000 elements.
All lists were run complete for both methods (MD5 .NET framework implementation & manual MD5 implementation) and […]