有人能帮我介绍一下coreldraw中的exportfilter对象模型吗?我找不到关于这个主题的任何好信息,除了我不理解它是如何产生的示例代码?我是vba coreldraw的新手。
Dim exF as ExportFilter
From object browser ExportFilter has
Finish - method
HasDialog - properties
Reset - method
ShowDialog - method
My questions how many sample code that scattered on many forum about coreldraw vba can include for example,
With exF
m_Compression = .Compression
m_Smoothing = .Smoothing
m_bOptimized = .Optimized
m_Progressive = .Progressive
m_Subformat = .Subformat
End With
I am sorry but i copy those above code from JPGExportOptions just to get the picture what the question i ask to this forum
How can i find and know that JPGExportFilter has
.Compression
.Smoothing
.Optimized
etc
All this is JPGExportFilter object model, i just want to know why this properties or method does not reveal on object browser vba window and does not have any help associated with all those ExportFilter object model如果我只能复制别人写的程序,我怎么能称自己为专业程序员呢?我只想知道ExportFilter类的详细信息。不幸的是,很少有书籍讨论coreldraw vba。这个站点http://www.oberonplace.com/vba/filter10vba.htm很好,但是,我需要更多的信息,而不仅仅是列表,我需要类的每个成员的解释-属性和方法-以及如何在实际代码中使用它。
谢谢
发布于 2015-05-19 22:51:44
如果您使用的是Corel Draw X7,您应该能够在%PROGRAMFILES%\Corel\CorelDRAW Graphics Suite X7\Data上找到该对象模型的文档。不幸的是,本文档不能在线提供参考或超链接。
在Corel Draw X7中,您可以对要导出的对象调用ExportEx,并以StructExportOptions对象的形式传递导出选项。您可以阅读上面提到的文档中的所有选项。
文档中的示例:
Sub Test()
Dim d As Document
Dim s As Shape
Dim opt As New StructExportOptions
Dim pal As New StructPaletteOptions
Dim Filter As ExportFilter
Set d = CreateDocument
Set s = d.ActiveLayer.CreateEllipse2(4, 5, 2)
s.Fill.ApplyFountainFill CreateRGBColor(255, 0, 0), CreateRGBColor(0, 0, 0)
opt.AntiAliasingType = cdrNormalAntiAliasing
opt.ImageType = cdrRGBColorImage
opt.ResolutionX = 72
opt.ResolutionY = 72
pal.PaletteType = cdrPaletteOptimized
pal.NumColors = 16
pal.DitherType = cdrDitherNone
Set Filter = d.ExportEx("C:\Temp\Doc.gif", cdrGIF, cdrCurrentPage, opt, pal)
If Filter.ShowDialog() Then
If Not Filter.Interlaced Then
MsgBox "Interlaced is not specified... Fixing this."
Filter.Interlaced = True
End If
Filter.Finish
Else
MsgBox "Export canceled"
End If
End Sub https://stackoverflow.com/questions/22702911
复制相似问题