title: Get class by its name in Delphi
body: <p>I would like to write a function that accepts a classname and results the corresponding <code>TClass</code>. I've noticed that, <code>System.Classes.GetClass</code> function doesn't works if the classname isn't registered.</p>
  
  <p><strong>Example:</strong></p>
  
  <pre><code>if(GetClass('TButton') = nil)
  then ShowMessage('TButton not found!')
  else ShowMessage('TButton found!');
  </code></pre>
  
  <p>The previous code always shows:</p>
  
  <blockquote>
    <p>TButton not found!</p>
  </blockquote>
  
  <p>Is there something missing?</p>