标题:看看这代码,为什么LABEL不能直接显示变量文本?
取消只看楼主
elantion
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2006-11-28
 问题点数:0 回复次数:0 
看看这代码,为什么LABEL不能直接显示变量文本?
我按书的步骤去做,为什么LABEL2.还是不能显示?代码如下
Dim sysinfo As String
Private Sub Label2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
sysinfo += Environment.MachineName & Environment.NewLine
sysinfo += Environment.UserName & Environment.NewLine
sysinfo += Environment.GetFolderPath(Environment.SpecialFolder.System) & Environment.NewLine
sysinfo += Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) & Environment.NewLine
sysinfo += Environment.OSVersion.Version.ToString() & Environment.NewLine
sysinfo += Environment.TickCount & "毫秒" & Environment.NewLine
sysinfo += TimeZone.CurrentTimeZone.StandardName & Environment.NewLine
sysinfo += Environment.NewLine
Dim envvar As Collections.DictionaryEntry
For Each envvar In Environment.GetEnvironmentVariables()
sysinfo += envvar.Key & ":`" & envvar.Value & Environment.NewLine
Next
Label2.Text = sysinfo
End Sub
搜索更多相关主题的帖子: Environment LABEL 变量 文本 NewLine 
2006-11-29 23:33



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-106232-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 1.093427 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved