A
ahmadka
I am facing this really strange thing, while using the Visio control in
C#....let me explain:
If you read this post of mine:
http://msdn.microsoft.com/newsgroup...b3bd-4363-8b4c-6d027d7226f6&lang=en&cr=US&p=1
You will know that I was having trouble when I try to create a new Visio
control at runtime...
So to tackle this, what I did was make one Visio control at design time, and
then make some visio control at run time, which are copies of this one visual
control that was created at design time...
for example, if the design time visio control is called dummyVisioControl,
then I make 2 new visio controls at run time like this:
AxMicrosoft.Office.Interop.VisOcx.AxDrawingControl rtVisioControl1 = new
AxMicrosoft.Office.Interop.VisOcx.AxDrawingControl();
AxMicrosoft.Office.Interop.VisOcx.AxDrawingControl rtVisioControl2 = new
AxMicrosoft.Office.Interop.VisOcx.AxDrawingControl();
rtVisioControl1 = dummyVisioControl;
rtVisioControl2 = dummyVisioControl;
Now, the problem I am facing now is that, if I modify a property of
rtVisioControl1, the modification also takes place for rtVisioControl2...
I was just trying to place 10 copies of the dummy control at runtime, but I
kept seeing only *one* actual control on the GUI...
It seems as if all the copies of the dummy control at just pointers, that
point to the dummy control itself...
So basically, my question is, how can I make these copies independent (if
possible) ?
The basic solution to this that I found was to create all the copies at
design time....But that is a very inefficent way to do the job because then I
would have to hard code everything in my program...
If I can successfully make *independent* copies like above, I can use more
efficient methods, use arrays, etc...which is better....
Help please....
C#....let me explain:
If you read this post of mine:
http://msdn.microsoft.com/newsgroup...b3bd-4363-8b4c-6d027d7226f6&lang=en&cr=US&p=1
You will know that I was having trouble when I try to create a new Visio
control at runtime...
So to tackle this, what I did was make one Visio control at design time, and
then make some visio control at run time, which are copies of this one visual
control that was created at design time...
for example, if the design time visio control is called dummyVisioControl,
then I make 2 new visio controls at run time like this:
AxMicrosoft.Office.Interop.VisOcx.AxDrawingControl rtVisioControl1 = new
AxMicrosoft.Office.Interop.VisOcx.AxDrawingControl();
AxMicrosoft.Office.Interop.VisOcx.AxDrawingControl rtVisioControl2 = new
AxMicrosoft.Office.Interop.VisOcx.AxDrawingControl();
rtVisioControl1 = dummyVisioControl;
rtVisioControl2 = dummyVisioControl;
Now, the problem I am facing now is that, if I modify a property of
rtVisioControl1, the modification also takes place for rtVisioControl2...
I was just trying to place 10 copies of the dummy control at runtime, but I
kept seeing only *one* actual control on the GUI...
It seems as if all the copies of the dummy control at just pointers, that
point to the dummy control itself...
So basically, my question is, how can I make these copies independent (if
possible) ?
The basic solution to this that I found was to create all the copies at
design time....But that is a very inefficent way to do the job because then I
would have to hard code everything in my program...
If I can successfully make *independent* copies like above, I can use more
efficient methods, use arrays, etc...which is better....
Help please....