以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 某列为标题,如何在窗口滚动显示各行内容 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=20798) |
-- 作者:grtulxd -- 发布时间:2012/6/19 23:01:00 -- 某列为标题,如何在窗口滚动显示各行内容 某列为标题,如何在窗口滚动显示各行内容 |
-- 作者:grtulxd -- 发布时间:2012/6/19 23:04:00 -- Dim txt As String Dim txt0 As String=Tables("表a").Rows(0)("第一列") Dim txt1 As String Dim txt2 As String Dim count As Integer = " " & Tables("表a").Rows.Count & " " If count>0 Then If count=1 Then txt="最新公告: " & txt0 & " " Else For n As Integer = 1 To Tables("表a").Rows.Count - 1 txt1=Tables("表a").Rows(n-1)("第一列") txt2=Tables("表a").Rows(n)("第一列") txt="最新公告: " & txt0 & " " & txt2 & " ★ " & txt1 & " " Next End If Else txt="今天无新公告内容" End If Dim pm As WinForm.Label = e.Form.Controls("Label1") pm.text=" " & txt & " " Dim j As Integer Static i As Integer i=e.Form.TimerInterval +i j=i Mod 125 Select Case j Case 0 pm.ForeColor = Color.Fuchsia Case 1 pm.ForeColor = Color.Peru Case 2 pm.ForeColor = Color.Navy Case 3 pm.ForeColor = Color.Aqua Case 4 pm.ForeColor = Color.Yellow Case 5 pm.ForeColor = Color.Gold Case Else pm.ForeColor = Color.Red End Select
Dim zwz As Integer =pm.left-4 If zwz +pm.Width<= 4 Then pm.left = e.form.Width Else pm.left = zwz End If
不能滚动显示不了所有行的文字内容,请老大指教 |
-- 作者:ksyh518 -- 发布时间:2012/6/20 9:16:00 -- 很多引号多余,例: Dim count As Integer = " " & Tables("表a").Rows.Count & " "
txt="最新公告: " & txt0 & " "
txt="最新公告: " & txt0 & " " & txt2 & " ★ " & txt1 & " " 。。。 |