title: SetCompatibleTextRenderingDefault in .NET Class Library containing a form
body: <p>I have a .net class library with a com class that calls a form.
  I want to to <code>SetCompatibleTextRenderingDefault(false)</code> to ensure the form fonts look nice.</p>
  
  <p>If I run the command in the class constructor I get the following error:
  <code>SetCompatibleTextRenderingDefault must be called before the first IWin32Window object is created in the application.</code></p>
  
  <p>Where can/should I run this?  Surely there is no earlier place than sub New!</p>
  
  <p>Thank in advance</p>
  
  <p>Jon</p>
  
  <p>Edit1: To clarify, I get this error when initiating the class from a .net test harness, if I call it from a VB6 app then I simply get "Automation Error"</p>
  
  <p>Edit2: Is the answer that I cannot use <code>SetCompatibleTextRenderingDefault</code> in a com class when calling from a vb6 app??  Maybe it's the "parent" app that needs to call this method and as such a vb6 app cannot?</p>
  
  <p><strong><em>Edit3: Maybe I am asking this question in the wrong way! - Maybe the question is: how can I make the fonts look nice in a .net class library form called from a vb6 app?</em></strong></p>