C#——listbox的体验----显示数字
来源:互联网 发布:淘宝好评如何删除评价 编辑:程序博客网 时间:2024/05/17 06:35
/*烟台大学计算机学院学生 *All right reserved. *文件名称:C#——listbox的体验----显示数字*作者:杨飞 *完成日期:2014年9月2日 *版本号:v1.0 *对任务及求解方法的描述部分:C#——listbox的体验----显示数字*我的程序:*/using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Windows.Forms;namespace WindowsFormsApplication1{ public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void listBox1_SelectedIndexChanged(object sender, EventArgs e) { } private void Form1_Load(object sender, EventArgs e) { Random d = new Random(); for (int i = 0; i < 10; i++) { int x = d.Next(10,100); listBox1.Items.Add(x.ToString()); } } private void button1_Click(object sender, EventArgs e) { label2.Text= listBox1.SelectedItem.ToString() ; } }}
运行结果:
心得体会:呵呵
0 0
- C#——listbox的体验----显示数字
- C#——列表框(listbox)的体验添加
- C语言打开文件对话框—并送至ListBox控件显示
- WTL分列显示的ListBox
- WTL分列显示的ListBox
- C#-—控制数字的个数和只能显示数字的程序
- C#-—体验字段
- C#-—体验接口
- C#-—体验结构
- C#-—体验枚举
- C#-—体验委托
- C#-—体验泛型栈
- C实现 显示重复的数字
- WPF—— ListBox的使用
- 【C++】 显示一些数字
- C--显示十六进制数字
- ListBox中的字符串超长显示的解决方法
- ListBox中的字符串超长显示的解决方法
- 如何用命令(cmd)创建AVD
- 嵌入式 C 面试题1
- #parama para
- hdu 5071
- 多态中函数、成员、静态函数的特点
- C#——listbox的体验----显示数字
- C字节
- Android--高效地加载大图片
- java学习3、初学多线程、多进程
- 桶排序
- poj_3667线段树区间合并
- 三角形
- 2014-11.2
- Android项目-高考作文项目架构(二)