为什么多行文本框不自动下滑到最底部呢? 麻烦老师帮忙看看 谢谢!
此主题相关图片如下:14.gif
按钮事件代码:
MyTimers("计划1").Enabled = False '启动计划2
Dim t7 As WinForm.TextBox = Forms("主窗体").Controls("textbox1")
t7.text=""
Dim dt = t7.BaseControl
Dim s1 As WinForm.TextBox = e.Form.Controls("1")
If cint(s1.text)>0 Then
MyTimers("循环执行导出Device").Enabled = True '启动计划2
MyTimers("循环执行导出Device").Interval = cint(s1.text) * 1000 '计划2的执行间隔改为4秒
Application.DoEvents
End If
Dim s2 As WinForm.TextBox = e.Form.Controls("2")
If cint(s2.text)>0 Then
MyTimers("循环执行导出DeviceStatus").Enabled = True '启动计划2
MyTimers("循环执行导出DeviceStatus").Interval = cint(s2.text) * 1000 '计划2的执行间隔改为4秒
Application.DoEvents
End If
Dim s3 As WinForm.TextBox = e.Form.Controls("3")
If cint(s3.text)>0 Then
MyTimers("循环执行导出Department").Enabled = True '启动计划2
MyTimers("循环执行导出Department").Interval = cint(s3.text) * 1000 '计划2的执行间隔改为4秒
Application.DoEvents
End If
Dim s4 As WinForm.TextBox = e.Form.Controls("4")
If cint(s4.text)>0 Then
MyTimers("循环执行导出typeofwork").Enabled = True '启动计划2
MyTimers("循环执行导出typeofwork").Interval = cint(s4.text) * 1000 '计划2的执行间隔改为4秒
Application.DoEvents
End If
Dim s5 As WinForm.TextBox = e.Form.Controls("5")
If cint(s5.text)>0 Then
MyTimers("循环执行导出realdata").Enabled = True '启动计划2
MyTimers("循环执行导出realdata").Interval = cint(s5.text) * 1000 '计划2的执行间隔改为4秒
Application.DoEvents
End If
Dim s6 As WinForm.TextBox = e.Form.Controls("6")
If cint(s6.text)>0 Then
MyTimers("循环执行导出dayrunrecord").Enabled = True '启动计划2
MyTimers("循环执行导出dayrunrecord").Interval = cint(s6.text) * 1000 '计划2的执行间隔改为4秒
Application.DoEvents
End If
Dim s7 As WinForm.TextBox = e.Form.Controls("7")
If cint(s7.text)>0 Then
MyTimers("循环执行导出AreaConfig").Enabled = True '启动计划2
MyTimers("循环执行导出AreaConfig").Interval = cint(s7.text) * 1000 '计划2的执行间隔改为4秒
Application.DoEvents
End If
Dim s8 As WinForm.TextBox = e.Form.Controls("8")
If cint(s8.text)>0 Then
MyTimers("循环执行导出classset").Enabled = True '启动计划2
MyTimers("循环执行导出classset").Interval = cint(s8.text) * 1000 '计划2的执行间隔改为4秒
Application.DoEvents
End If
Dim s9 As WinForm.TextBox = e.Form.Controls("9")
If cint(s9.text)>0 Then
MyTimers("循环执行导出JobPosition").Enabled = True '启动计划2
MyTimers("循环执行导出JobPosition").Interval = cint(s9.text) * 1000 '计划2的执行间隔改为4秒
Application.DoEvents
End If
Dim s10 As WinForm.TextBox = e.Form.Controls("10")
If cint(s10.text)>0 Then
MyTimers("循环执行导出protitle").Enabled = True '启动计划2
MyTimers("循环执行导出protitle").Interval = cint(s10.text) * 1000 '计划2的执行间隔改为4秒
Application.DoEvents
End If
Dim s11 As WinForm.TextBox = e.Form.Controls("11")
If cint(s11.text)>0 Then
MyTimers("循环执行导出staff").Enabled = True '启动计划2
MyTimers("循环执行导出staff").Interval = cint(s11.text) * 1000 '计划2的执行间隔改为4秒
Application.DoEvents
End If
t7.SelectionStart = t7.Text.Length
dt.ScrollToCaret
Application.DoEvents