borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2008 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Next Topic (Reverse Chart) New Topic New Poll Post Reply
AndreaVB Forum : VB General : MSchart, HELPPPPPP
Poster Message
akdmks
Level: Protégé

Registered: 05-05-2005
Posts: 4

icon MSchart, HELPPPPPP

Hi, I have a big problem
I save my mschart to a .bmp file but I lost the name of all the series in the graphics, they become "C1", "C2"or "C3"
I really need to keep the real name
To save the graph, I use the Save Picture

I become CRAZY !!

Thanks a lot

JO

05-05-2005 at 10:16 AM
View Profile Send Email to User Show All Posts | Quote Reply
steve_w
Level: Moderator


Registered: 18-04-2003
Posts: 1159
icon Re: MSchart, HELPPPPPP

Hi

Try it this way, put the chart into a picture box. Add the following code to the formload.

    MSChart1.Width = Picture1.Width
    MSChart1.Height = Picture1.Height


Then on your save button use the following code. It copies it to the clipboard and pastes the image into the picture box, then you save that.

Private Sub Command2_Click()

    MSChart1.EditCopy
    Picture1.AutoRedraw = True
    Picture1.Picture = Clipboard.GetData(vbCFMetafile)
    SavePicture Picture1.Image, "C:\pic.bmp"

End Sub


Steve  

05-05-2005 at 11:27 AM
View Profile Send Email to User Show All Posts | Quote Reply
akdmks
Level: Protégé

Registered: 05-05-2005
Posts: 4
icon Re: MSchart, HELPPPPPP

It still doesn't work .... :-(

05-05-2005 at 11:58 AM
View Profile Send Email to User Show All Posts | Quote Reply
steve_w
Level: Moderator


Registered: 18-04-2003
Posts: 1159
icon Re: MSchart, HELPPPPPP

Post your code if you like, mine worked.


Steve  

05-05-2005 at 12:29 PM
View Profile Send Email to User Show All Posts | Quote Reply
akdmks
Level: Protégé

Registered: 05-05-2005
Posts: 4
icon Re: MSchart, HELPPPPPP

Yes, it worked, but when I check the Jpeg file, you can see that the legend has become "C1", "C2", and it's not for example "Prices", "Average" ...
You see what I mean, but a legend in your Mschart and you will see ... :-)

05-05-2005 at 12:31 PM
View Profile Send Email to User Show All Posts | Quote Reply
steve_w
Level: Moderator


Registered: 18-04-2003
Posts: 1159
icon Re: MSchart, HELPPPPPP

Id did,i just changed the one legend to try it.


____________________________
Attached:
pic.jpg (23 KB)

05-05-2005 at 12:42 PM
View Profile Send Email to User Show All Posts | Quote Reply
akdmks
Level: Protégé

Registered: 05-05-2005
Posts: 4
icon Re: MSchart, HELPPPPPP

Yé, i'm very surprised of it, can you send me the whole code, for checking (scuz my french, i'm french ... lol)
Maybe i have to change something in the property of the mschart  ...
THANK You
THANK you
You saved my life !!!

05-05-2005 at 12:55 PM
View Profile Send Email to User Show All Posts | Quote Reply
steve_w
Level: Moderator


Registered: 18-04-2003
Posts: 1159
icon Re: MSchart, HELPPPPPP

Good luck  

____________________________
Attached:
Project1.zip 3 KB (Downloads: 9)

05-05-2005 at 01:07 PM
View Profile Send Email to User Show All Posts | Quote Reply
wen_dell
Level: Scholar

Registered: 17-01-2005
Posts: 48
icon Re: MSchart, HELPPPPPP

thank you sir steve it help me a lot in our project  

____________________________
GOD IS MY SHEPERD

04-01-2008 at 03:50 AM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : VB General : MSchart, HELPPPPPP
Next Topic (Reverse Chart) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2008 Andrea Tincaniborder