Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共2 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:for循环 lable 的text值不刷新

1楼
puma 发表于:2023/9/12 8:50:00
求助:for 循环里更新 lable 的text,需要用什么函数?


以下代码:只能显示for循环后,最后一个值
图片点击可在新窗口打开查看
Dim lb As WinForm.Label = e.Form.Controls("Label1")
Dim value As String
Dim i As Integer
For i =1 To 10
    
    value=i
    lb.text="时间" & i & "当前值 " & value
    'If value > 0 Then
        ''MessageBox.show(value )
        ''Exit For
    'End If
    Threading.Thread.Sleep(1000)
    
Next
2楼
有点蓝 发表于:2023/9/12 9:34:00
http://www.foxtable.com/webhelp/topics/1476.htm

lb.text="时间" & i & "当前值 " & value
Application.DoEvents
共2 条记录, 每页显示 10 条, 页签: [1]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .02344 s, 2 queries.