早教吧作业答案频道 -->数学-->
VB中dimaasinteger,如果在某个事件中想写这样的代码,text1(a).forcolor=***,但是a的范围是但是a的范围是fora=0to15和fora=18to20,现在我这样写的:fora=0to15text(a).forecolor=***nextfora=18to20text(a).
题目详情
VB中 dim a as integer ,如果在某个事件中想写这样的代码,text1(a).forcolor=***,但是a 的范围是
但是a的范围是 for a=0 to 15 和 for a =18 to 20,现在我这样写的:
for a=0 to15
text(a).forecolor=***
next
for a =18 to 20
text(a).forecolor=***
next
如果变量a需要断开分了很多段就要写很多次,能简化吗
后面的***是相同的参数
但是a的范围是 for a=0 to 15 和 for a =18 to 20,现在我这样写的:
for a=0 to15
text(a).forecolor=***
next
for a =18 to 20
text(a).forecolor=***
next
如果变量a需要断开分了很多段就要写很多次,能简化吗
后面的***是相同的参数
▼优质解答
答案和解析
可以这样简化,但意义似乎不大
for a=0 to20
if a=18 then
text(a).forecolor=***
endif
next
for a=0 to20
if a=18 then
text(a).forecolor=***
endif
next
看了 VB中dimaasinteg...的网友还看了以下:
想问大家表达这样一个意思的成语就是比较想了解一个东西,但这个东西似乎会带来伤害,但想了解它就必需先 2020-04-11 …
英语听力问题我想问问一般提高听力材料不要选太难的,但是我想选cnn的材料,虽然有很多听不懂,但是我 2020-05-13 …
有一个数学问题没有想明白,希望能够得到解答一到趣味数学题,想不明白,可能有点复杂,我慢慢说:ABC 2020-05-16 …
怎么理解W=Uq?我是这样想的,W=Uq=E·d·q(d是距离)。E先乘q,得到F,再乘d,就是说 2020-06-12 …
我基础较差,准备背初中单词,6本书.我是想问一天背一本好,还是一星期背一本好.我知道一天背不牢,但 2020-06-22 …
二十世纪八十年代语文书内容关于一副锦画,绣的是美丽的家园,栩栩如生,一老妈妈绣花绣的眼睛都看不见了 2020-06-25 …
下列东西方思想家,按照其思想都有肯定人的价值的共同之处来搭配,错误的是A.孔子—苏格拉底B.孔子— 2020-06-25 …
顾炎武的”亡国”不同于”亡天下”的思想A.其实质是”精忠报国”B.具有明显的反封建专制色彩C.具有 2020-06-27 …
某思想家说:“你所说的话不一定正确,但我誓死捍卫你说话的权利。”该思想家是()A.爱迪生B.伏尔泰 2020-06-29 …
原题如下在HAc溶液中加入下列物质时,使HAc的解离度增大的是()(A)NaAc(B)HCl(C) 2020-07-03 …