将MSChart添加到VB.NET [英] Adding MSChart to VB.NET

查看:211
本文介绍了将MSChart添加到VB.NET的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是VB.NET的新手,我正在尝试获取以下代码,从MSDN下载

来运行。


Private Sub Form1_Load( ByVal sender As System.Object,ByVal e As

System.EventArgs)处理MyBase.Load


Dim arrData(2,2)


arrData(1,1)=" Jan" ''设置第一个系列中的标签。


arrData(2,1)=" Feb"


arrData(3,1 )=" Mar"


arrData(1,2)= 8

arrData(2,2)= 4


arrData(3,2)= 0.3


arrData(1,3)= 0.2


arrData( 2,3)= 3

arrData(3,3)= 6.3


MSChart1.ChartData = arrData''MSChart1有蓝色波浪形线下

它.......这是我的问题


结束子


我换了arrData反映基于零的索引。


我已将MSChart添加到工具箱并在Form1上使用它,将其

(name)属性更改为Chart1。 br />

我想只是添加一个昏暗的MSChart1作为Chart1在子元素的开头可以工作,但是没有。

让编译器识别MSChart1我缺少什么?


感谢您的时间,J er

解决方案

" JJ" <所以** @ local.net> schrieb

我是VB.NET的新手,我正试图从MSDN下载以下代码,


私有子Form1_Load(ByVal发送者)作为System.Object,ByVal e As
System.EventArgs)处理MyBase.Load

Dim arrData(2,2)

arrData(1,1)= "扬" ''在第一个系列中设置标签。

arrData(2,1)=" Feb"

arrData(3,1)=" Mar"

arrData(1,2)= 8
arrData(2,2)= 4

arrData(3,2)= 0.3

arrData(1,3)= 0.2
arrData(2,3)= 3
arrData(3,3)= 6.3

MSChart1.ChartData = arrData''MSChart1下面有蓝色的波浪线
.......这是我的问题

结束子

我更改了arrData以反映基于零的索引。

我已将MSChart添加到工具箱并在Form1上使用它,将其(名称)属性更改为Chart1。
我想只是在一开始时添加一个昏暗的MSChart1作为Chart1
sub可以工作,它没有。

让编译器识别MSChart1我缺少什么? / blockquote>


如果它的名字是Chart1,你必须使用


Chart1.ChartData = arrData

-

Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote .html





当我将ms图表控件添加到表单时默认名称是

AxMsChart1。


Ken

--------------

" JJ" <所以** @ local.net>在消息中写道

news:vv ************ @ corp.supernews.com ...

我是VB的新手。 NET并且我正在尝试从MSDN下载以下代码来运行。

Private Sub Form1_Load(ByVal sender As System.Object,ByVal e As
System.EventArgs)处理MyBase.Load

Dim arrData(2,2)

arrData(1,1)=" Jan" ''在第一个系列中设置标签。

arrData(2,1)=" Feb"

arrData(3,1)=" Mar"

arrData(1,2)= 8
arrData(2,2)= 4

arrData(3,2)= 0.3

arrData(1,3)= 0.2
arrData(2,3)= 3
arrData(3,3)= 6.3

MSChart1.ChartData = arrData''MSChart1有蓝色波浪线
下面它.......这是我的问题

结束子

我更改了arrData以反映基于零的索引。

我已将MSChart添加到工具箱并在Form1上使用它,将其
(name)属性更改为Chart1。

我想只是添加一个昏暗的MSChart1作为Chart1在
sub
开始工作,它没有。

我错过了什么让编译器识别MSChart1?

感谢您的时间,J er





Armin Zingler < AZ ******* @ freenet.de>在消息中写道

news:OG ************** @ TK2MSFTNGP10.phx.gbl ...

" JJ" <所以** @ local.net> schrieb
如果它的名字是Chart1,你必须使用

Chart1.ChartData = arrData

-
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/ news / learn2quote.html




根据你的建议更改它会出现错误,''ChartData''不是$

''AxOWC10.AxChartSpace'的成员。


我没有任何进口报表,我应该吗?


J er


I am a novice at VB.NET and am trying to get the following code, downloaded
from MSDN to run.

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

Dim arrData(2, 2)

arrData(1, 1) = "Jan" '' Set the labels in the first series.

arrData(2, 1) = "Feb"

arrData(3, 1) = "Mar"

arrData(1, 2) = 8

arrData(2, 2) = 4

arrData(3, 2) = 0.3

arrData(1, 3) = 0.2

arrData(2, 3) = 3

arrData(3, 3) = 6.3

MSChart1.ChartData = arrData ''MSChart1 has the blue squiggly line under
it.......this is MY PROBLEM

End Sub

I changed arrData to reflect zero based indexing.

I have added MSChart to the toolbox and used it on Form1, changing its
(name) property to Chart1.

I thought just adding a dim MSChart1 as Chart1 at the beginning of the sub
would work, it didn''t.

What am I missing to get the compiler to recognize MSChart1 ?

Thanks for your time, J e r


解决方案

"JJ" <so**@local.net> schrieb

I am a novice at VB.NET and am trying to get the following code,
downloaded from MSDN to run.

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

Dim arrData(2, 2)

arrData(1, 1) = "Jan" '' Set the labels in the first series.

arrData(2, 1) = "Feb"

arrData(3, 1) = "Mar"

arrData(1, 2) = 8

arrData(2, 2) = 4

arrData(3, 2) = 0.3

arrData(1, 3) = 0.2

arrData(2, 3) = 3

arrData(3, 3) = 6.3

MSChart1.ChartData = arrData ''MSChart1 has the blue squiggly line
under it.......this is MY PROBLEM

End Sub

I changed arrData to reflect zero based indexing.

I have added MSChart to the toolbox and used it on Form1, changing
its (name) property to Chart1.

I thought just adding a dim MSChart1 as Chart1 at the beginning of
the sub would work, it didn''t.

What am I missing to get the compiler to recognize MSChart1 ?



If it''s name is Chart1, you must use

Chart1.ChartData = arrData
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html


Hi,

When I add a ms chart control to a form it default name is
AxMsChart1.

Ken
--------------
"JJ" <so**@local.net> wrote in message
news:vv************@corp.supernews.com...

I am a novice at VB.NET and am trying to get the following code, downloaded
from MSDN to run.

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

Dim arrData(2, 2)

arrData(1, 1) = "Jan" '' Set the labels in the first series.

arrData(2, 1) = "Feb"

arrData(3, 1) = "Mar"

arrData(1, 2) = 8

arrData(2, 2) = 4

arrData(3, 2) = 0.3

arrData(1, 3) = 0.2

arrData(2, 3) = 3

arrData(3, 3) = 6.3

MSChart1.ChartData = arrData ''MSChart1 has the blue squiggly line
under
it.......this is MY PROBLEM

End Sub

I changed arrData to reflect zero based indexing.

I have added MSChart to the toolbox and used it on Form1, changing its
(name) property to Chart1.

I thought just adding a dim MSChart1 as Chart1 at the beginning of the
sub
would work, it didn''t.

What am I missing to get the compiler to recognize MSChart1 ?

Thanks for your time, J e r




"Armin Zingler" <az*******@freenet.de> wrote in message
news:OG**************@TK2MSFTNGP10.phx.gbl...

"JJ" <so**@local.net> schrieb
If it''s name is Chart1, you must use

Chart1.ChartData = arrData
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html



Changing it per your suggestion brings up the error, "''ChartData'' is not a
member of ''AxOWC10.AxChartSpace''.

I do not have any imports statements, should I ?

J e r


这篇关于将MSChart添加到VB.NET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆