作者greencup (飘)
看板Visual_Basic
标题Re: [VB6 ] 请问"物件名.属性.附属性"整个可以设成 …
时间Wed Mar 14 17:21:17 2007
※ 引述《likewinnie (winnie)》之铭言:
: ※ 引述《greencup (飘)》之铭言:
: : 我想做的是把text1.text="hello"这个动作
: : 改成先将text1.text的部分换成变数(ex.i)
: : 再i="hello"
: : 可以实现吗?
: 你是说改成text1.text=i ?
: 再i="hello" ?
: text1.text=i ==>可以呀.
: 不过你如果这样写
: text1.text=i
: i="hello"
: 那当然不行啦...
: 要换一下顺序...
: i="hello"
: text1.text=i
: 不过我觉得奇怪,那麽基本的问题你何不try一下? try了就知道啦
我可能表达不太好= =
原意是想写
If Form1.Text2.BackColor = &H80000002 then
i= Form1.Text2
ElseIf Form1.Text3.BackColor = &H80000002 Then
i = Form1.Text3
ElseIf Form1.Text4.BackColor = &H80000002 Then
i = Form1.Text4
end if
i.text="hello~"
这样i是不是需要定义成什麽样的变数才可以执行?
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 59.112.49.71
1F:→ O2000:把i宣告成TextBox就行了 03/14 17:58
2F:→ greencup:恩 改过以後就可以用了 谢谢喔~ 03/14 18:47