title: Displaying a mathematical formula in a form and messagebox VB.NET
body: <p>How to display a mathematical formula in a form and in a messagebox? </p>
  
  <p>I <a href="http://www.codeproject.com/Articles/11406/Enable-Your-Users-to-Write-Math-Equations-in-Your" rel="nofollow">found an article to enable users to Write Math Equations in a Web</a> 
  Even though there includes a vb.net version I can make it to work on visual studio 2010 for a  desktop app</p>
  
  <p>I have seen it uses:</p>
  
  <pre><code>  [System.Runtime.InteropServices.DllImport("MimeTex.dll")]
      internal static extern int CreateGifFromEq(string expr, 
                                               string fileName);
  </code></pre>
  
  <p>But how to do analog for vb.net?</p>
  
  <p>I know I have to include </p>
  
  <pre><code>Imports System.Runtime.InteropServices
  </code></pre>
  
  <p>then</p>
  
  <pre><code>Friend Class NativeMethods
          &lt;DllImport("MimeTex", CharSet:=CharSet.Auto, SetLastError:=True)&gt; _
          Public Shared Function CreateGifFromEq(ByVal expr As String, ByVal fileName As String) As Integer
          End Function
      End Class
  </code></pre>
  
  <p>but I get: </p>
  
  <pre><code>Error   1   'CreateGifFromEq' is not declared. It may be inaccessible due to its protection level.  
  </code></pre>
  
  <p>when using</p>
  
  <pre><code> CreateGifFromEq("((x+4+9+8)/2)*0.8", "image.png")
  </code></pre>
  
  <p>Is there a way to draw equations and show it in a messagebox?</p>