Categories
Programming VB.Net

VB.Net: Get type in shared (static) context

Before I start I have to clear one thing, but I do not want to explain it:  that what static means in Delphi is Shared in VB.Net. When you do not know what I am talking about here then please read the documentation!

In Delphi it’s easy to access the class itself (not the instance!) in which a static method is declared: you can use Self to access the class and its static methods and properties. Imho it’s not that easy in VB.Net! I tried some things until is stumbled over this thread. I know that there is the solution for my problem, so why do I post the solution once more? The first reason is that I want to say that the solution postet there works ;) And second one is that I want to spread the solution because I haven’t found it very often via Google.

Categories
Programming VB.Net

VB.Net: Outlook AddIn: Design mode or Runtime?

At the moment I write an AddIn for Microsoft Outlook 2007 in Visual Studio 2010, using .Net Framework 3.5. For this project I added some UserControl components which need to know if current state is design mode or runtime. Well, there is the possibilty to ask the component itself (via Me.DesignMode) but when you want to know that in general you can use this method if you want to know: