vb.net画长方体 vb长方形面积代码-成都快上网建站

vb.net画长方体 vb长方形面积代码

谁知道怎么用VB.NET编写一个算长方形面积的程序?

dim a as single=...'自己输入长方形的长

创新互联主营堆龙德庆网站建设的网络公司,主营网站建设方案,app软件定制开发,堆龙德庆h5微信小程序搭建,堆龙德庆网站营销推广欢迎堆龙德庆等地区企业咨询

dim b as single=...'自己输入长方形的宽

dim c as single=a*b'计算面积

textbox1.text=c'显示面积

求用VB图形设计实现十朵花、十个长方体和正方体... 谢谢啦~

Private Sub Command1_Click()

Const π = 3.14159127

For i = 0 To 9

For j = 0 To 360 Step 30

Me.Circle (Sin(j * (π / 180)) * 150 + 800 * i + 500, Cos(-j * (π / 180)) * 150 + 500), 100, vbRed

Next

Next

End Sub

Private Sub Command2_Click()

For i = 0 To 9

Line (i * 800 + 250, 1000)-(i * 800 + 750, 1500), vbMagenta, B

Next

End Sub

Private Sub Command3_Click()

For i = 0 To 9

Line (i * 800 + 250, 1700)-(i * 800 + 750, 1900), vbBlue, B

Next

End Sub

Private Sub Command4_Click()

Cls

End Sub

Private Sub Form_Load()

Move 0, 0, 9675, 4300

Me.AutoRedraw = True

Command1.Move 8160, 480, 1215, 495

Command2.Move 8160, 1080, 1215, 495

Command3.Move 8160, 1680, 1215, 495

Command4.Move 8160, 2280, 1215, 495

End Sub

vb.net设计一个rectangle(长方形)类,应具有以下内容:1两个private的成员变量:rectWidth和rectHeight

[1] private rectWidth As double ,rectHeight As double

[2] return rectWidth

[3] rectWidth=value

[4] return rectHeight

[5] rectHeight=value

[6]这个在注释语句里我也不清楚要怎么填,不会是题目搞错了吧。-_-|||

[7] return 2 *( rectWidth+ rectHeight)

[8] return rectWidth * rectHeight

[9] ,[10] 应该是对rectl的width 和height 属性赋值。

messagebox。show(“长方形rect1的周长是:” rectl.GetSize “长方形rect2的面积是:” rectl.GetArea)

怎样用VB画出实体的三维立体图出来,比如说一个球和一个长方体,谢谢

这在其他语言中很好办(尤其是C++),在VB中就不太好办了,你尝试着用一下OpenGL,网上有资料

VB.net中如何画图?

VB.net与VB不同。

VB.net已经有专门绘图的类。

可以定义笔刷然后用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中如何实现给出基本数据(开始坐标,长,宽,高)完成自动画出长方体

Option Explicit

Dim W As Integer

Dim L As Integer

Dim H As Integer

Dim x As Integer

Dim i As Integer

Dim y As Integer

Dim pi As Single

Private Sub Command1_Click()

pi = 3.141592654

W = 5000

L = 3000

H = 1000

x = 200

y = 5000

Line (x, y)-(x + L, y + H), vbBlue, BF

For i = 1 To H

Line (x + L, y + i)-(x + L + W * (Sin(pi / 4)), y + i - W * (Sin(pi / 4))), vbRed

Next

For i = 1 To L

Line (x + i, y)-(x + i + W * (Sin(pi / 4)), y - W * (Sin(pi / 4))), vbYellow

Next

End Sub


本文名称:vb.net画长方体 vb长方形面积代码
文章来源:http://kswjz.com/article/dodcdco.html
扫二维码与项目经理沟通

我们在微信上24小时期待你的声音

解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流