关于VB的caption 和command问题
来源:百度知道 编辑:UC知道 时间:2024/07/08 00:15:46
初学VB,用VB编个小程序
Private Sub Timer1_Timer()
Timer1.Enabled = True
Label1.Caption = Now
End Sub
但是结果是老提示我““caption”不是“system.Windows.Forms.Label”的成员”。我按的是visual studio 2005,这个问题是版本太低的问题吗?而且我VB里面没有command控件,也是因为版本问题吗?
请求帮忙,现在没有积分,十分不好意思。。。。
Private Sub Timer1_Timer()
Timer1.Enabled = True
Label1.Caption = Now
End Sub
但是结果是老提示我““caption”不是“system.Windows.Forms.Label”的成员”。我按的是visual studio 2005,这个问题是版本太低的问题吗?而且我VB里面没有command控件,也是因为版本问题吗?
请求帮忙,现在没有积分,十分不好意思。。。。
因为VB2005中把Label.Caption改成了Label.Text ,所以呢……
Private Sub Timer1_Timer()
Timer1.Enabled = True
Label1.Text = Now
End Sub
就可以了~~
下一个问题……VB2005中把command更改为了button……所以……
(^_^)/~~
希望对您有帮助~!
Private Sub Timer1_Timer()
Timer1.Enabled = True
Label1.Caption = cstr(Now())
End Sub
不是版本问题。是安装包的问题。安装包里没有包含VB基本控件的全部,所以你要么下载其他组件补充,或重找个安装程序。。
建议重找个安装程序
你是想把 时间显示出来是吧