首页 > 编程 > .NET > 正文

用VB.net制作一个小程序(3)

2024-07-10 13:01:29
字体:
来源:转载
供稿:网友
用vb.net制作一个小程序(3)
----制作“input controls”程序(3)
接上

'picturebox2

'

me.picturebox2.location = new system.drawing.point(480, 136)

me.picturebox2.name = "picturebox2"

me.picturebox2.size = new system.drawing.size(80, 56)

me.picturebox2.sizemode = system.windows.forms.pictureboxsizemode.stretchimage

me.picturebox2.tabindex = 10

me.picturebox2.tabstop = false

'

'picturebox3

'

me.picturebox3.location = new system.drawing.point(376, 224)

me.picturebox3.name = "picturebox3"

me.picturebox3.size = new system.drawing.size(80, 72)

me.picturebox3.sizemode = system.windows.forms.pictureboxsizemode.stretchimage

me.picturebox3.tabindex = 11

me.picturebox3.tabstop = false

'

'picturebox4

'

me.picturebox4.location = new system.drawing.point(480, 224)

me.picturebox4.name = "picturebox4"

me.picturebox4.size = new system.drawing.size(80, 64)

me.picturebox4.sizemode = system.windows.forms.pictureboxsizemode.stretchimage

me.picturebox4.tabindex = 12

me.picturebox4.tabstop = false

'

'picturebox5

'

me.picturebox5.location = new system.drawing.point(368, 312)

me.picturebox5.name = "picturebox5"

me.picturebox5.size = new system.drawing.size(88, 56)

me.picturebox5.sizemode = system.windows.forms.pictureboxsizemode.stretchimage

me.picturebox5.tabindex = 13

me.picturebox5.tabstop = false

'

'form1

'

me.autoscalebasesize = new system.drawing.size(6, 14)

me.clientsize = new system.drawing.size(592, 374)

me.controls.addrange(new system.windows.forms.control() {me.picturebox5, me.picturebox4, me.picturebox3, me.picturebox2, me.picturebox1, me.label4, me.combobox1, me.button1, me.label3, me.label2, me.listbox1, me.label1, me.groupbox2, me.groupbox1})

me.name = "form1"

me.text = "form1"

me.groupbox1.resumelayout(false)

me.groupbox2.resumelayout(false)

me.resumelayout(false)



end sub



#end region



private sub label4_click(byval sender as system.object, byval e as system.eventargs) handles label4.click



end sub



private sub label3_click(byval sender as system.object, byval e as system.eventargs) handles label3.click



end sub



private sub checkbox1_checkedchanged(byval sender as system.object, byval e as system.eventargs) handles checkbox1.checkedchanged

if checkbox1.checkstate = 1 then

picturebox2.image = system.drawing.image.fromfile _

("c:/documents and settings/gaoshan/my documents/vb/input controls/input controls/0565.jpg")

picturebox2.visible = true

else

picturebox2.visible = false

end if

end sub



private sub listbox1_selectedindexchanged(byval sender as system.object, byval e as system.eventargs) handles listbox1.selectedindexchanged

select case listbox1.selectedindex

case 0

picturebox3.image = system.drawing.image.fromfile _

("c:/documents and settings/gaoshan/my documents/vb/input controls/input controls/0004.jpg")

case 1

picturebox3.image = system.drawing.image.fromfile _

("c:/documents and settings/gaoshan/my documents/vb/input controls/input controls/0005.jpg")

case 2

picturebox3.image = system.drawing.image.fromfile _

("c:/documents and settings/gaoshan/my documents/vb/input controls/input controls/0010.jpg")

end select

end sub



private sub form1_load(byval sender as system.object, byval e as system.eventargs) handles mybase.load

picturebox1.image = system.drawing.image.fromfile _

("c:/documents and settings/gaoshan/my documents/vb/input controls/input controls/0513.jpg")

listbox1.items.add("extra a had disk")

listbox1.items.add("printer")

listbox1.items.add("statellite dish")

combobox1.items.add("u.s.dollars")

combobox1.items.add("check")

combobox1.items.add("english pounds")

end sub



private sub checkbox2_checkedchanged(byval sender as system.object, byval e as system.eventargs) handles checkbox2.checkedchanged

if checkbox2.checkstate = 1 then

picturebox4.image = system.drawing.image.fromfile _

("c:/documents and settings/gaoshan/my documents/vb/input controls/input controls/0387.jpg")

picturebox4.visible = true

else

picturebox4.visible = false

end if

end sub



private sub checkbox3_checkedchanged(byval sender as system.object, byval e as system.eventargs) handles checkbox3.checkedchanged

if checkbox3.checkstate = 1 then

picturebox5.image = system.drawing.image.fromfile _

("c:/documents and settings/gaoshan/my documents/vb/input controls/input controls/0043.jpg")

picturebox5.visible = true

else

picturebox5.visible = false

end if

end sub

end class

全文完
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表