View Single Post
  #1  
Old 28-04-2014, 09:41
AVP AVP is offline
Junior Member
 
Join Date: May 2009
Posts: 13
Default Bugs in automation CorelDraw X7 + VS2010

Interesting bugs in automation CorelDraw X7 + VS2010
First bug:
This code (vb.net) gives an error:
Code:
Dim cdrapp As New VGCore.Application

    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click       
        Try
            cdrapp.ActiveShape.Outline.Justification = VGCore.cdrOutlineJustification.cdrOutlineJustificationOutside
        Catch ex As Exception
            MessageBox.Show(ex.Message)
        End Try
    End Sub
But this code (VBA) works fine:
Code:
Public Sub test()
  ActiveShape.Outline.Justification = cdrOutlineJustificationOutside
End Sub
Second bug:

This code (vb.net) gives an error:
Code:
Dim cdrapp As New VGCore.Application

    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click       
        Try
            cdrApp.FrameWork.Automation.InvokeItem("13f1794d-bf6b-455a-969c-47f80bd6b912") 'select master shape for clones
        Catch ex As Exception
            MessageBox.Show(ex.Message)
        End Try
    End Sub
But this code (VBA) works fine:
Code:
Public Sub test()
 Application.FrameWork.Automation.InvokeItem ("13f1794d-bf6b-455a-969c-47f80bd6b912")'select master shape for clones
End Sub
Reply With Quote