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

程序

用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

全文完

时间: 2024-08-03 10:10:21

用VB.net制作一个小程序(3)的相关文章

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

程序 用VB.net制作一个小程序(2)----制作"Lucky7"程序作者:高山 它是一个模拟幸运数字投币机的游戏程序.此程序的用户界面中包括两个按钮,3个幸运数字框,表示获胜的数字图象以及Lucky 7标签. Public Class Form1 Inherits System.Windows.Forms.Form #Region " Windows 窗体设计器生成的代码 " Public Sub New() MyBase.New() '该调用是 Windows

用vb.net制作一个小游戏

问题描述 学了vb.net大概两个月了,想自己做一个小游戏试试.我想参考一下一下游戏的代码及思路,希望大神们帮助. 解决方案 解决方案二:正规游戏的基本框架思路,需要你有3年以上的程序开发经验,再学.你说的那种游戏,如果是初中生电脑兴趣班那种设计,那么其实多多留意各种讨论并且亲自上机实践(最好还能自己认证回复两句)即可获得体验.那并不是真正的"游戏",只是一般的编程体验.解决方案三:在google里面搜site:download.csdn.netvb.net游戏答案立刻就有解决方案四:

独家 | 手把手教你用scrapy制作一个小程序 !(附代码)

目录 一.前言 二.原理 2.1 爬取流程 2.2 各部块的解释 2.3 scrapy数据流的分析 三.理解 四.实战 4.1 首先是安装scrapy 4.2 建立项目和下载pycharm以及pycharm的配置 4.3 提取标题名和作者名 4.4 scrapy流程解析 4.5 小项目难度加深 五.对scrapy建立项目的feedback 5.1 如何更快地找 bug 5.2 共存解释器可能导致的种种报错 六.知识补充 6.1 Spider中的类和方法 一. 前言 Scrapy是用于Python

结果是什么啊-一个小程序,求解答啊

问题描述 一个小程序,求解答啊 在别人文章里看到的程序 程序的输出结果是什么,why? #include int main() { int a[5] = {1,2,3,4,5}; int p = (int)(&a + 1); printf("%d, %dn", *(a + 1), *(p -1)); } 解决方案 int a[5] = {1,2,3,4,5}; int* p = (int*)(&a + 1); printf("%d, %dn", *(

如何制作一个小LINUX

要制作一个小的Linux,我们就要了解Linux系统开机的整个过程,其实很简单,跟WIN差不多. POST(BIOS加电自检)-->根据BIOS的设定启动相应的设备-->Boot loader -->解压内核到内存 -->运行init进程 整个过程大概如上所述. 其中,内核在加载的过程中所完成的工作包括以下: 硬件探测 完成设备驱动程序初始化(initrd获取驱动程序,以模块的形式存在) 挂载根文件系统(以只读方式挂载) 装载/sbin/init,启动系统的PID为1的进程 系统的

c-求大神解惑!一个小程序运行不了

问题描述 求大神解惑!一个小程序运行不了 #include #include struct data{int daymonthyear;} ;struct stu {char name[20];long num;struct data birthday;} ;int main(){struct stu *student; student=malloc(sizeof(struct stu)); printf(""Input namenumberyearmonthday:/n"&

关于hadoop pig编写的一个小程序 

问题描述 关于hadoop pig编写的一个小程序 在微博中如果a关注b b也关注a则他们构成相互关注关系.如果输入的文件1.txt里的内容如下23 1221 2331 2323 21 每一行表示a的代号和关注他的人的代号怎么写Pig 输出 相互关注的每一对.比如这上面的数据中输出21 23(且不重复输出这一对)

关于BaseAdapter的一个小程序的问题

问题描述 关于BaseAdapter的一个小程序的问题 额,代码比较长................... public class Main extends ListActivity { private static String[] applicationNames = new String[] { "多功能日历", "eoeMarket客户端", "耐玩的重力消砖块", "白社会", "程序终结者"

c++-初学C++ 一个小程序 求大神帮忙看下

问题描述 初学C++ 一个小程序 求大神帮忙看下 //分秒显示函数 #include using namespace std; //全局引用std命名空间 void showTime(int ,int); int main() { int hours =0 , mins = 0;//定义且初始化分 和秒 cout << "Input the hour "; cin >> hours; cout << "Input the mins &quo