G
gil.assayag
Hi!
I'm developing a C# .NET 1.1 application. Basically it's a form that
holds two Visio Drawings, both inherit from a base wrapper class I
named VisioDrawingBase (that has an axDrawingControl1 member). Problem
is that a stencil that opens in the initialization opens twice in one
of the controls (instead of one in each of the controls).
In this base class, I register to the event 'VisibleChanged', as I saw
in one of the samples, in order to initialize:
private void axDrawingControl1_VisibleChanged(object sender,
System.EventArgs e)
{
// Only initialize the first time.
if (this.axDrawingControl1.Visible && m_bFirstTime)
{
this.axDrawingControl1.Focus();
Initialize();
}
}
The initialization is (also in the base class):
protected void Initialize()
{
Visio.Documents VisDocs =
axDrawingControl1.Window.Windows.Application.Documents;
// Open the sites stencil
string sStencilPath = Application.StartupPath + "\\..\\" +
Constants.sVisResFolder + Constants.sVisStencilSites;
VisDocs.OpenEx(sStencilPath, (short)
Visio.VisOpenSaveArgs.visOpenRO);
}
However, this stencil opens twice in one of the controls.
Any idea what I'm doing wrong? Any ideas for a workaround? Am I
initializing in the right place?
Thank you very much,
Gil
I'm developing a C# .NET 1.1 application. Basically it's a form that
holds two Visio Drawings, both inherit from a base wrapper class I
named VisioDrawingBase (that has an axDrawingControl1 member). Problem
is that a stencil that opens in the initialization opens twice in one
of the controls (instead of one in each of the controls).
In this base class, I register to the event 'VisibleChanged', as I saw
in one of the samples, in order to initialize:
private void axDrawingControl1_VisibleChanged(object sender,
System.EventArgs e)
{
// Only initialize the first time.
if (this.axDrawingControl1.Visible && m_bFirstTime)
{
this.axDrawingControl1.Focus();
Initialize();
}
}
The initialization is (also in the base class):
protected void Initialize()
{
Visio.Documents VisDocs =
axDrawingControl1.Window.Windows.Application.Documents;
// Open the sites stencil
string sStencilPath = Application.StartupPath + "\\..\\" +
Constants.sVisResFolder + Constants.sVisStencilSites;
VisDocs.OpenEx(sStencilPath, (short)
Visio.VisOpenSaveArgs.visOpenRO);
}
However, this stencil opens twice in one of the controls.
Any idea what I'm doing wrong? Any ideas for a workaround? Am I
initializing in the right place?
Thank you very much,
Gil