.NET开发

本类阅读TOP10

·NHibernate快速指南(翻译)
·vs.net 2005中文版下载地址收藏
·【小技巧】一个判断session是否过期的小技巧
·VB/ASP 调用 SQL Server 的存储过程
·?dos下编译.net程序找不到csc.exe文件
·通过Web Services上传和下载文件
·学习笔记(补)《.NET框架程序设计(修订版)》--目录
·VB.NET实现DirectDraw9 (2) 动画
·VB.NET实现DirectDraw9 (1) 托管的DDraw
·建站框架规范书之——文件命名

分类导航
VC语言Delphi
VB语言ASP
PerlJava
Script数据库
其他语言游戏开发
文件格式网站制作
软件工程.NET开发
'用VB.net制作一个小程序(3)

作者:未知 来源:月光软件站 加入时间:2005-2-28 月光软件站

  '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

全文完




相关文章

相关软件