'用VB.net制作一个小程序(3)
敬业的IT人
互联网
佚名
2008-5-23 20:35:42
用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
全文完
----制作“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
全文完
- 最新文章
- C++, C#, Java, VB.NET,到底该选择哪一门..[05-23]
- vb.net实现木马注册机原理:动态配置exe[05-23]
- VB 编写下载者 把下载信息存在资源文件里。。[05-23]
- VB异步处理应用实例:磁盘文件全文搜索[05-23]
- VB应用之DOS程序窗口化[05-23]
- 给blood的礼物《A Programmer's Intro..[05-23]
- 相关文章
- C++, C#, Java, VB.NET,到底该选择哪一门..[05-23]
- vb.net实现木马注册机原理:动态配置exe[05-23]
- [注意]VB.Net将死?[05-23]
- VB.NET中读取INI文件设置信息函数sdGetIniIn..[05-23]
- Autodesk官方最新的.NET教程(七)(vb.net版..[05-23]
- Autodesk官方最新的.NET教程(六)(vb.net版..[05-23]
