Foxtable(狐表)用户栏目专家坐堂 → VB,C#代码用在fox


  共有2481人关注过本帖树形打印复制链接

主题:VB,C#代码用在fox

帅哥哟,离线,有人找我吗?
有点甜
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/12/24 9:15:00 [显示全部帖子]

全局代码

 

Public Sub CreateTextInCorelDRAW(text As String, fontName As String, fontSize As Single)

Dim pia_type As Type = Type.GetTypeFromProgID("CorelDRAW.Application.17")

Dim app As object = Activator.CreateInstance(pia_type)

app.Visible = True

Dim doc As object = app.ActiveDocument

If doc Is Nothing Then doc = app.CreateDocument()

Dim shape As object = doc.ActiveLayer.CreateArtisticText( _
0.0, 0.0, text, Corel.Interop.VGCore.cdrTextLanguage.cdrLanguageMixed, _
Corel.Interop.VGCore.cdrTextCharSet.cdrCharSetMixed, fontName, fontSize, _
Corel.Interop.VGCore.cdrTriState.cdrUndefined, Corel.Interop.VGCore.cdrTriState.cdrUndefined, _
Corel.Interop.VGCore.cdrFontLine.cdrMixedFontLine, Corel.Interop.VGCore.cdrAlignment.cdrLeftAlignment)

End Sub

 


 回到顶部