几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   ObjectARX(VB.NET/C#) (http://www.dimcax.com/hust/forumdisplay.php?f=176)
-   -   【转帖】关于如何处理在vb.net里汉字乱码问题 (http://www.dimcax.com/hust/showthread.php?t=9344)

yang686526 2009-04-20 08:04 PM

【转帖】关于如何处理在vb.net里汉字乱码问题
 
关于如何处理在vb.net里汉字乱码问题
www.dimcax.com
关于如何处理在vb.net里汉字乱码问题我用如下代码去处理
但出现的是乱码
如何解决,不胜感激
dim mtextobject as autocad.acadmtext
dim mtextstring as string
dim insertionpoint(2) as double
dim width as double
'定义文本的宽度,书写位置
width = 45
insertionpoint(0) = pointtop(0) - 116.0# : insertionpoint(1) = pointtop(1) + 7.0# : insertionpoint(2) = pointtop(2)
mtextstring = "\u+2205 \u+2770"
dim acadapp as autocad.acadapplication
on error resume next
acadapp = getobject(, "autocad.application")
acadapp.activedocument.activetextstyle.fontfile = "c:\windows\fonts\simsun.ttf"
mtextobject = acadapp.activedocument.modelspace.addmtext(insertionpoint, width, mtextstring)
你直接用汉字不行么?
用单文本(addtext)直接输入汉字,显示正常
而用多本文(addmtext)则是乱码


所有的时间均为北京时间。 现在的时间是 06:58 AM.