|
|
|
Junior Member
      
Group: Forum Members
Last Login: 12/22/2008 3:13:14 AM
Posts: 18,
Visits: 64
|
|
| Hi Rahul, I am getting following exception while plotting chart. ex = {"Exception of type 'System.Windows.Forms.AxHost+InvalidActiveXStateException' was thrown."} This is my code: FC = new AxShockwaveFlashObjects.AxShockwaveFlash(); FC.Movie = Application.StartupPath + "\\FusionCharts\\FCF_Bar2D.swf?chartWidth=220&chartHeight=300"; FC.MovieData = chartURL; FC.Play(); plz reply...how to resolve it Thanking you, Avinash
|
|
|
|
|
Supreme Being
      
Group: Moderators
Last Login: Today @ 2:34:46 AM
Posts: 192,
Visits: 729
|
|
| Hi Avinash, You are getting this message because you are just creating an object of AxShockwaveFlashObjects.AxShockwaveFlash(); and not adding FC into the Form's Control. You need to use this.Controls.Add(FC); like the following code:
FC = new AxShockwaveFlashObjects.AxShockwaveFlash(); this.Controls.Add(FC); FC.Movie = Application.StartupPath + "\\FusionCharts\\FCF_Bar2D.swf?chartWidth=220&chartHeight=300"; FC.MovieData = chartURL; FC.Play();
Regards,
Rahul
FusionCharts Team.
|
|
|
|
|
Junior Member
      
Group: Forum Members
Last Login: 12/22/2008 3:13:14 AM
Posts: 18,
Visits: 64
|
|
| Thanx Rahul, It works fine........ but it was creating new form control also. I want to show flash movie on same form control .........i dont want to create new form plz reply Avinash
|
|
|
|
|
Supreme Being
      
Group: Moderators
Last Login: Today @ 2:34:46 AM
Posts: 192,
Visits: 729
|
|
| Hi Avinash, If you don't want to add new control then you need not create a new chart Object. You can do the same as following way: FC.Movie = Application.StartupPath + "\\FusionCharts\\FCF_Bar2D.swf?chartWidth=" + FC.Width.ToString() + "&chartHeight=" + FC.Height.ToString(); //dataXML method FC.SetVariable("dataXML","<graph><set value='10' /></graph>"); //dataURL method FC.SetVariable("dataURL", "Path to XML file");Otherwise try this: int oldHeight = FC.Height; int oldWidth = FC.Width; int oldTop = FC.Top; int oldLeft = FC.Left; FC.Dispose(); FC = new AxShockwaveFlashObjects.AxShockwaveFlash(); FC.Height = oldHeight; FC.Width = oldWidth; FC.Top = oldTop; FC.Left = oldLeft; this.Controls.Add(FC); FC.Movie = Application.StartupPath + "\\FusionCharts\\FCF_Bar2D.swf?chartWidth=220&chartHeight=300"; FC.MovieData = chartURL; FC.Play();
Regards,
Rahul
FusionCharts Team.
|
|
|
|