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



textbox 问题


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


textbox 问题[已结贴,结贴人:justin919]
发表于:2007-09-06 14:51:03 楼主
dim   x   as   integer  
    for   x=0   to   35
          if   text1(x)=0   then  
                    text2(1)=text1(x).index  
          end   if    
    next   x  

'到这里后就能实现,当text1(x)=0时,自动在text2(1)里面显示text1(x).index  
然后继续查找,比如     text1(4)=0的时候,自动在text2(2)里面显示text1(4).index
  当text1(15)=0时,自动在text2(3)里面显示text1(15).index,这个如何实现呢?

谢谢大家!
发表于:2007-09-06 15:24:141楼 得分:20
dim   x   as   integer  
dim   i   as   long
i=1
    for   x=0   to   35
          if   text1(x)=0   then  
                    text2(i)=text1(x).index  
                    i=i+1
          end   if    
    next   x
发表于:2007-09-06 15:24:182楼 得分:10
private   sub   text1_change(index   as   integer)
        if   index   >   35   then   exit   sub
        if   val(text1(index).text)   <>   0   then   exit   sub
        text2(index)   =   text1(index).index
end   sub
发表于:2007-09-06 15:58:193楼 得分:20
dim   x   as   integer  
dim   count   as   integer
    for   x=0   to   35
          if   text1(x).text=0   then  
                    text2(count   )=x
                    count   =count   +1
          end   if    
    next   x


快速检索

最新资讯
热门点击