资讯

精准传达 • 有效沟通

从品牌网站建设到网络营销策划,从策略到执行的一站式服务

vb.net屏幕上画图 vb画图语句

VB.net中如何画图?

分类: 电脑/网络 程序设计 其他编程语言

创新互联公司专注于金牛企业网站建设,成都响应式网站建设公司,商城网站定制开发。金牛网站建设公司,为金牛等地区提供建站服务。全流程按需设计网站,专业设计,全程项目跟踪,创新互联公司专业和态度为您提供的服务

问题描述:

VB6中的form1.circle (100,200),rgb(0,255,0)的语句如何在VB中使用啊?

急用啊!!!!!!!!

解析:

VB与VB不同。

VB已经有专门绘图的类。

可以定义笔刷然后用Drawing类中的方法绘制。

Private Sub DrawEllipse()

Dim myPen As New System.Drawing.Pen(System.Drawing.Color.Red)

Dim formGraphics as System.Drawing.Graphics

formGraphics = Me.CreateGraphics()

formGraphics.DrawEllipse(myPen, New Rectangle(0,0,200,300))

myPen.Dispose()

formGraphics.Dispose()

End Sub

Private Sub DrawRectangle()

Dim myPen As New System.Drawing.Pen(System.Drawing.Color.Red)

Dim formGraphics as System.Drawing.Graphics

formGraphics = Me.CreateGraphics()

formGraphics.DrawRectangle(myPen, New Rectangle(0,0,200,300))

myPen.Dispose()

formGraphics.Dispose()

End Sub

vb.net桌面中bitmap类如何直接绘制到屏幕?

可以直接显示的。你看下面的示例,使用vb.net画的齿轮:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

b = New Bitmap(PictureBox1.Width, PictureBox1.Height)

g = Graphics.FromImage(b)

'g.RotateTransform(90)

g.Clear(Color.White)

g.TranslateTransform(PictureBox1.Width / 2, PictureBox1.Height / 2)

g.ScaleTransform(1, -1)

'g.SmoothingMode = Drawing2D.SmoothingMode.AntiAlias

g.SmoothingMode = Drawing2D.SmoothingMode.HighQuality

DrawCL(g, New PointF(Val(TextBox1.Text), Val(TextBox2.Text)), Val(TextBox3.Text), Val(TextBox4.Text), Val(TextBox5.Text), Val(TextBox6.Text), Val(TextBox7.Text), Val(TextBox8.Text), Val(TextBox9.Text))

DrawCL(g, New PointF(Val(TextBox18.Text), Val(TextBox17.Text)), Val(TextBox16.Text), Val(TextBox15.Text), Val(TextBox14.Text), Val(TextBox13.Text), Val(TextBox12.Text), Val(TextBox11.Text), Val(TextBox10.Text))

PictureBox1.Image = b

End Sub

vb.net 如何实现在drawpanel中画图显示后复制显示在picturebox上?请具体说明

drawpanel是什么东东,自定义控件吗?如果类似于picturebox,使用

'自动重绘要设为True,如果有这个属性的话

DrawPanel.AutoRedraw = True

'保存到变量

Image img = DrawPanel.Image 

'直接设置Image属性即可

PictureBox1.Image = img


文章名称:vb.net屏幕上画图 vb画图语句
网页URL:http://cdkjz.cn/article/dogisis.html
多年建站经验

多一份参考,总有益处

联系快上网,免费获得专属《策划方案》及报价

咨询相关问题或预约面谈,可以通过以下方式与我们联系

业务热线:400-028-6601 / 大客户专线   成都:13518219792   座机:028-86922220