tags:

views:

95

answers:

2

I'm finding references to this namespace but it is not actually in System.Design. If I add the line LOGFONT lf; to my code, the editors dropdown suggestions include:

System.Design.NativeMethods.LOGFONT

Do you know where to pick it up? I'm having trouble tracking it down. Is it some sort of a 3rd party add-on? It's not in the add references dialog list.

A: 

It's exactly where you think it is. But as reflector show it's internal :

internal class NativeMethods

You could either access it by reflection (and add a dependency to the version of the framework as there is no guarantee on internal APIs) or write your own methods.

The easiest way as always for pinvoke is Pinvoke.net, where you could find the LOGFONT struct.

VirtualBlackFox
Yes you are both exactly right, I don't know what I was thinking. I was faked out by the dropdown box in the editor. It's showing internal classes you can't use.
P a u l
A: 

It is an internal class. It means, it's only accessible to classes defined inside that assembly.

Mehrdad Afshari