您的位置:程序门 -> vb -> 基础类



怎么点一下command控件,就循环一次,text控件的内容?


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


怎么点一下command控件,就循环一次,text控件的内容?[已结贴,结贴人:fwlfir]
发表于:2007-03-25 00:17:31 楼主
str1   =   "123 "  
str2   =   "321 "  
text1.text   =   str1  
怎么点一下command控件,就循环一次,text控件的内容?  
现在只能循环str1里面的内容!不能循环str2  
谢谢了    
 
 
发表于:2007-03-25 08:38:051楼 得分:0
详细点再
发表于:2007-03-25 08:52:062楼 得分:0
这个是点一下command   就变一次text1的内容的...不知道是你要的不...
select   case   i

case   0
    text1.text   =   "123 "
    case   1
    text1.text   =   "213 "
    case   2
    text1.text   =   "321 "

   
end   select

i   =   i   +   1
发表于:2007-03-25 13:04:593楼 得分:20
使用数组变量:
option   explicit
dim   str(3)   as   string
dim   i   as   integer

private   sub   command1_click()
i   =   i   +   1
text1   =   str(i   -   1)
if   i   > =   4   then
i   =   i   -   4
end   if
end   sub

private   sub   form_load()
str(0)   =   "hello! "
str(1)   =   "a "
str(2)   =   "b "
str(3)   =   "c "
end   sub


快速检索

最新资讯
热门点击