| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 462 人关注过本帖
标题:VB.NET问题求教
只看楼主 加入收藏
hexiyi4511
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2006-5-19
收藏
 问题点数:0 回复次数:1 
VB.NET问题求教
请问哪位高手,能帮我解决这个问题不啊。
就是用VB. net输出:
*
* *
* * *
* *
*
想请哪位高手帮解决一下啊
谢谢
搜索更多相关主题的帖子: NET 
2006-05-19 07:07
adair
Rank: 3Rank: 3
等 级:新手上路
威 望:9
帖 子:250
专家分:0
注 册:2005-9-3
收藏
得分:0 

Dim g As Graphics
Dim rownum As Integer = 10

Private Sub Form3_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint
g = e.Graphics
Dim row As Integer
Dim col As Integer
Dim sspace As String = "*"
Dim sstr As String = "*"
Dim spacelength As Integer = g.MeasureString(sspace, New Font("Times New Romain", 12, FontStyle.Regular)).Width
Dim strlength As Integer = g.MeasureString(sstr, New Font("Times New Romain", 12, FontStyle.Regular)).Width
For row = 1 To rownum
Dim m As Integer
g.DrawString(sstr, New Font("Times New Romain", 12, FontStyle.Regular), Brushes.Red, 50 + (rownum - row) * spacelength, 50 + (row - 1) * 10)
For m = 1 To row - 1
g.DrawString(sstr, New Font("Times New Romain", 12, FontStyle.Regular), Brushes.Red, 50 + (rownum - row) * spacelength + m * (spacelength + strlength), 50 + (row - 1) * 10)
' g.DrawString(sstr, New Font("Times New Romain", 12, FontStyle.Regular), Brushes.Red, 50 + strlength, 50 + (row - 1) * 10)
Next
g.DrawString(Environment.NewLine, New Font("Times New Romain", 12, FontStyle.Regular), Brushes.Red, Me.Width, 50 + (row - 1) * 10)
Next
g.Dispose()
End Sub



下面部分自己画

[此贴子已经被作者于2006-5-20 14:32:35编辑过]


********年轻无极限******** 要時刻相信你自己,不要被自己打敗
2006-05-19 13:57
快速回复:VB.NET问题求教
数据加载中...
 
   



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

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