成都网站建设设计

将想法与焦点和您一起共享

vb.net划线 vba 画线

VB.net中如何在picturebox画线,有什么函数?

Dim b As New Bitmap(PictureBox1.Width, PictureBox1.Height)

成都创新互联公司从2013年成立,先为古交等服务建站,古交等地企业,进行企业商务咨询服务。为古交企业网站制作PC+手机+微官网三网同步一站式服务解决您的所有建站问题。

Dim g As Graphics = Graphics.FromImage(b)

g.Clear(Color.White)

Dim p As New Pen(Color.Black)

p.EndCap = Drawing2D.LineCap.ArrowAnchor

g.DrawLine(p, 30, PictureBox1.Height - 30, 30, 30)

g.DrawLine(p, 30, PictureBox1.Height - 30, PictureBox1.Width - 30, PictureBox1.Height - 30)

Dim i As Integer

Dim bs As New SolidBrush(Color.Green)

Dim po As New Point

po.X = 0

po.Y = PictureBox1.Height - 35

For i = 700 To 1000 Step 50

g.DrawString(i, Me.Font, bs, po.X, po.Y)

g.DrawLine(p, po.X + 28, po.Y + 5, po.X + 30, po.Y + 5)

po.Y -= (PictureBox1.Height - 100) / 6

Next

po.X = 30

po.Y = PictureBox1.Height - 30

For i = 0 To 40 Step 5

g.DrawString(i, Me.Font, bs, po.X, po.Y + 5)

g.DrawLine(p, po.X, po.Y + 2, po.X, po.Y)

po.X += (PictureBox1.Width - 100) / 8

Next

PictureBox1.Image = b

vb.net的label怎么在鼠标移动过来时添加下划线?代码是什么?

Label1.Attributes.Add("onmouseover", "this.style.textDecoration='underline'"); //显示下划线

Label1.Attributes.Add("onmouseout", "this.style.textDecoration=''"); //隐藏下划线

vb.net中怎么给label设置下划线

将Label1 改成相应的 label 控件名称。

'鼠标经过时,显示下划线

Private Sub Label1_MouseEnter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.MouseEnter

Dim LabelFont As Font = New Font(Label1.Font.Name, Label1.Font.Size, FontStyle.Underline)

Label1.Font.Dispose()

Label1.Font = LabelFont

End Sub

'鼠标离开时,去除下划线

Private Sub Label1_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles Label1.MouseLeave

Dim LabelFont As Font = New Font(Label1.Font.Name, Label1.Font.Size, FontStyle.Regular)

Label1.Font.Dispose()

Label1.Font = LabelFont

End Sub


网站题目:vb.net划线 vba 画线
转载来于:http://chengdu.cdxwcx.cn/article/dohideh.html