-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
//页面测试伪数据
private void bindNumber()
{
#region 页面数据
ListViewItem lvi = new ListViewItem(new string[] { "纱布", "10", "10", "明细" });
listView1.Items.Add(lvi);
ListViewItem lvi2 = new ListViewItem(new string[] { "绷带", "10", "10", "明细" });
listView1.Items.Add(lvi2);
ListViewItem lvi3 = new ListViewItem(new string[] { "针管", "10", "10", "明细" });
listView1.Items.Add(lvi3);
#endregion
}
//列添加
private void addColumnHeader()
{
#region 添加行列
//ColumnHeader ch1 = new ColumnHeader();
//ch1.Text = "第一列";
//ColumnHeader ch2 = new ColumnHeader();
//ch2.Text = "第二列";
//ColumnHeader ch3 = new ColumnHeader();
//ch3.Text = "第三列";
//ColumnHeader ch4 = new ColumnHeader();
//ch4.Text = "第四列"; //listView1.Columns.Add(ch1);
//listView1.Columns.Add(ch2);
//listView1.Columns.Add(ch3);
//listView1.Columns.Add(ch4); //DataView dv = new DataView();
//DataColumn dc = new DataColumn("超链接",System.Type
#endregion
}
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
使用对象存储数组信息
Product p1 = new Product();
Product p2 = new Product();IList<Product> pro = new List<Product>();
pro.Add(p1);
pro.Add(p2);
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
全屏显示:
this.WindowState = FormWindowState.Maximized;
this.FormBorderStyle = FormBorderStyle.None;
this.ControlBox = false;
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
右上角 按钮显示
//this.MinimizeBox = false;//右上角显示OK按钮 点击直接关闭程序
// this.ControlBox = false;//页面右上角不显示按钮 //界面的默认设置 单击X最小化程序
//this.ControlBox = true;
//this.MinimizeBox = true;
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
VS2005自带的16*16 32*32的图片
在安装目录下面
Program Files\Microsoft Visual Studio 8\Common7\VS2005ImageLibrary\VS2005ImageLibrary.zip 中 解压就可以使用了
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
日期控件为空显示 选择后显示日期
//为空显示
private void FormLogin_Load(object sender, EventArgs e)
{
this.dateTimePicker1.Format = DateTimePickerFormat.Custom;
this.dateTimePicker1.CustomFormat = " ";
}//更改后显示日期 在ValueChanged 事情中编写
private void dateTimePicker1_ValueChanged(object sender, EventArgs e)
{
this.dateTimePicker1.Format = DateTimePickerFormat.Custom;
this.dateTimePicker1.CustomFormat = "yyyy-MM-dd HH:mm:ss";
}
------------------------------------------------------------------------------------------------------------------------------------------
分割线
------------------------------------------------------------------------------------------------------------------------------------------
.jpg和.bmp 图片在PDA上的展示效果大致相同,暂未发现不同点
------------------------------------------------------------------------------------------------------------------------------------------
分割线
------------------------------------------------------------------------------------------------------------------------------------------
用this.WindowState = FormWindowState.Maximized;
this.FormBorderStyle = FormBorderStyle.None;
this.ControlBox = false;
全屏后,假设设计窗体的宽度为242,高度为 293,设计图片时,高度为293的图片在全屏模式下不能占满整个屏幕,高度略差一个像素。
如图全屏
背景图片为293像素的图片:
------------------------------------------------------------------------------------------------------------------------------------------
分割线
------------------------------------------------------------------------------------------------------------------------------------------
.gif透明效果无法实现,透明度只有57%,然后放到PDA预览直接给无视了 效果如下
不死心 不支持透明度,看看能不能支持镂空
看来没办法了 只有连背景一块切来达到透明效果了
好伪透明搞定了
------------------------------------------------------------------------------------------------------------------------------------------
分割线
------------------------------------------------------------------------------------------------------------------------------------------