Hello,
we are using an .NET application as COM-component (COM-interop registered), and call this compontent via an Visual-Basic 6 programm. In this component the TeeChart commander is used in an frame. But in the commander, the associated icons are not shown, only the white boxes for the buttons are visible. Besides it, the commander works proper, all the features of the commander can be used.
If the same component is directly called with an .NET application, the icons are schown correctly.
And the icons are internal available in the first case two, it's possible to get an item with "Commander1.ImageList.Images(1)".
So, what can be the reason, that the icons's are not shown, or is there an workaround available ?
One possible solution can be the implementation of an own tool-bar with the same icons, but I can't find an possibility to call the features of the commander directly in the programm.
Thank you in advance
TeeChart Commander icons not shown in com .NET application
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi ECDP,
Steema Software's recommendation is to use TeeChart Pro ActiveX with Visual Studio 6. Please notice that a free TeeChart Pro v6 ActiveX is delivered with each TeeChart for .NET v2 license. For the ActiveX license details please check your TeeChart keys or contact our Sales Dept. at sales@steema.com.
Steema Software's recommendation is to use TeeChart Pro ActiveX with Visual Studio 6. Please notice that a free TeeChart Pro v6 ActiveX is delivered with each TeeChart for .NET v2 license. For the ActiveX license details please check your TeeChart keys or contact our Sales Dept. at sales@steema.com.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Hi,
thank you for the answer.
But we use the Tee-Chart in an complete .NET application in .NET (not in VB6), so I think we must use the .NET version.
In the case described, we don't use the tee chart in VB6, we only call an .NET application out of an VB6 application. And this .NET application uses an .NET assembly where we use the TeeChart and the Chart commander.
The problem it, why it works different dependet on it, if the assembly is called from an VB6 application or an .NET application (and it's the same dll)?
And, to implement an work-around with an own tool-bar, I should know if it is possible to call the features of the commander directly (simulation of a button click in the commander)?
Thanks
thank you for the answer.
But we use the Tee-Chart in an complete .NET application in .NET (not in VB6), so I think we must use the .NET version.
In the case described, we don't use the tee chart in VB6, we only call an .NET application out of an VB6 application. And this .NET application uses an .NET assembly where we use the TeeChart and the Chart commander.
The problem it, why it works different dependet on it, if the assembly is called from an VB6 application or an .NET application (and it's the same dll)?
And, to implement an work-around with an own tool-bar, I should know if it is possible to call the features of the commander directly (simulation of a button click in the commander)?
Thanks
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi ECDP,
Could you please send us a simple example project we can run "as-is" to reproduce the problem here?
You can post your files at news://www.steema.net/steema.public.attachments newsgroup.
Thanks in advance.
Could you please send us a simple example project we can run "as-is" to reproduce the problem here?
You can post your files at news://www.steema.net/steema.public.attachments newsgroup.
Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Hi,
thank you for the reply.
Now I have detected that it is not a problem of the steema commander but rather a problem of the microsoft toolBar object (the same problem occures with the normal toolBar). If I remove the "Application.EnableVisualStyles()" from the .NET application, the images are shown proper. So, this problem is resolved now.
But, only for interrest, would it possible to call the functions of the commander (such as 3D, zoom, moving etc.) directly in the program (using functions of the chart etc.), for sample starting the zoom option directly with code and not by the commander-button ?
Thanks
ECDP
thank you for the reply.
Now I have detected that it is not a problem of the steema commander but rather a problem of the microsoft toolBar object (the same problem occures with the normal toolBar). If I remove the "Application.EnableVisualStyles()" from the .NET application, the images are shown proper. So, this problem is resolved now.
But, only for interrest, would it possible to call the functions of the commander (such as 3D, zoom, moving etc.) directly in the program (using functions of the chart etc.), for sample starting the zoom option directly with code and not by the commander-button ?
Thanks
ECDP
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi ECDP,
Thanks for the information.
Yes, you can do something like this:
Thanks for the information.
Yes, you can do something like this:
Code: Select all
private Boolean RotateChart, MoveChart, ZoomChart, DChart, Go;
private int StartX, StartY;
private void Form1_Load(object sender, EventArgs e)
{
line1.FillSampleValues();
button1.Text = "Reset";
button2.Text = "Rotate";
button3.Text = "Move";
button4.Text = "Zoom";
button5.Text = "3D%";
button6.Text = "Editor";
}
private void button1_Click(object sender, EventArgs e)
{
tChart1.Aspect.Orthogonal = true;
tChart1.Aspect.HorizOffset = 0;
tChart1.Aspect.VertOffset = 0;
tChart1.Aspect.Zoom = 100;
tChart1.Aspect.Chart3DPercent = 15;
tChart1.Zoom.Allow = true;
tChart1.Panning.Allow = Steema.TeeChart.ScrollModes.Both;
RotateChart = false;
MoveChart = false;
ZoomChart = false;
Go = false;
}
private void button2_Click(object sender, EventArgs e)
{
RotateChart = true;
MoveChart = false;
ZoomChart = false;
DChart = false;
DisableZoomScroll();
}
private void button3_Click(object sender, EventArgs e)
{
RotateChart = false;
MoveChart = true;
ZoomChart = false;
DChart = false;
DisableZoomScroll();
}
private void button4_Click(object sender, EventArgs e)
{
RotateChart = false;
MoveChart = false;
ZoomChart = true;
DChart = false;
DisableZoomScroll();
}
private void button5_Click(object sender, EventArgs e)
{
//Changing Chart3DPercent
RotateChart = false;
MoveChart = false;
ZoomChart = false;
DChart = true;
DisableZoomScroll();
//Standard functionality
//tChart1.Aspect.View3D = !tChart1.Aspect.View3D;
}
private void button6_Click(object sender, EventArgs e)
{
tChart1.ShowEditor();
}
private void DisableZoomScroll()
{
tChart1.Zoom.Allow = false;
tChart1.Panning.Allow = Steema.TeeChart.ScrollModes.None;
}
private void tChart1_MouseDown(object sender, MouseEventArgs e)
{
if (RotateChart || MoveChart || ZoomChart || DChart)
{
Go = true;
StartX = e.X;
StartY = e.Y;
}
}
private void tChart1_MouseMove(object sender, MouseEventArgs e)
{
if (Go)
{
if (RotateChart)
{
tChart1.Aspect.Orthogonal = false;
tChart1.Aspect.Elevation = StartY - e.Y;
tChart1.Aspect.Rotation = e.X - StartX;
}
if (MoveChart)
{
tChart1.Aspect.HorizOffset = e.X - StartX;
tChart1.Aspect.VertOffset = e.Y - StartY;
}
if (ZoomChart)
{
tChart1.Aspect.Zoom = Math.Abs(e.X - StartX);
}
if (DChart)
{
if (((StartX - e.X) < 101) && ((StartX - e.X) > 0))
tChart1.Aspect.Chart3DPercent = StartX - e.X;
else
if ((StartX - e.X) > 101)
tChart1.Aspect.Chart3DPercent = 100;
else
tChart1.Aspect.Chart3DPercent = 1;
}
}
}
private void tChart1_MouseUp(object sender, MouseEventArgs e)
{
if (RotateChart)
{
tChart1.Aspect.Orthogonal = false;
tChart1.Aspect.Elevation = StartY - e.Y;
tChart1.Aspect.Rotation = e.X - StartX;
Go = false;
}
if (MoveChart)
{
tChart1.Aspect.HorizOffset = e.X - StartX;
tChart1.Aspect.VertOffset = e.Y - StartY;
Go = false;
}
if (ZoomChart)
{
tChart1.Aspect.Zoom = Math.Abs(e.X - StartX);
Go = false;
}
if (DChart)
{
if (((StartX - e.X) < 101) && ((StartX - e.X) > 0))
tChart1.Aspect.Chart3DPercent = StartX - e.X;
else
if ((StartX - e.X) > 101)
tChart1.Aspect.Chart3DPercent = 100;
else
tChart1.Aspect.Chart3DPercent = 1;
Go = false;
}
}
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |