如何在表单和消息框中显示数学公式?
我找到了一篇文章,使用户能够在 Web 中编写数学方程 即使其中包含一个 vb.net 版本,我也可以让它在 Visual Studio 2010 上用于桌面应用程序
我已经看到它使用:
[System.Runtime.InteropServices.DllImport("MimeTex.dll")]
internal static extern int CreateGifFromEq(string expr,
string fileName);
但是如何为 vb.net 做模拟呢?
我知道我必须包括
Imports System.Runtime.InteropServices
然后
Friend Class NativeMethods
<DllImport("MimeTex", CharSet:=CharSet.Auto, SetLastError:=True)> _
Public Shared Function CreateGifFromEq(ByVal expr As String, ByVal fileName As String) As Integer
End Function
End Class
但我得到:
Error 1 'CreateGifFromEq' is not declared. It may be inaccessible due to its protection level.
使用时
CreateGifFromEq("((x+4+9+8)/2)*0.8", "image.png")
有没有办法绘制方程式并将其显示在消息框中?