A
Asif
Hi all,
I did make a sample project by simply adding Visio 2007 drawing control
on form and one button to assign control source property to file name
using VB.NET.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
If Me.OpenFileDialog1.ShowDialog() = DialogResult.OK Then
Try
AxDrawingControl1.Src = Me.OpenFileDialog1.FileName
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End If
End Sub
The drawing control is opening selected file but once I am going to add
new page through Insert Page context menu (right clicking on page name
to open menu) it is giving me the following error
An unhandled exception of type 'System.NullReferenceException' occurred
in system.windows.forms.dll
Additional information: Object reference not set to an instance of an
object.
Can any one tell me whets I am doing wrong?
Thanks
Asif
I did make a sample project by simply adding Visio 2007 drawing control
on form and one button to assign control source property to file name
using VB.NET.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
If Me.OpenFileDialog1.ShowDialog() = DialogResult.OK Then
Try
AxDrawingControl1.Src = Me.OpenFileDialog1.FileName
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End If
End Sub
The drawing control is opening selected file but once I am going to add
new page through Insert Page context menu (right clicking on page name
to open menu) it is giving me the following error
An unhandled exception of type 'System.NullReferenceException' occurred
in system.windows.forms.dll
Additional information: Object reference not set to an instance of an
object.
Can any one tell me whets I am doing wrong?
Thanks
Asif