- 博客(0)
- 资源 (5)
- 收藏
- 关注
listview的用法?
private void button1_Click(object sender, EventArgs e)
{
this.button1.Dock = DockStyle.Top;
this.button3.Dock = DockStyle.Bottom;
this.button2.Dock = DockStyle.Bottom;
this.button3.SendToBack();
this.listView1.Visible = true;
}
private void button2_Click(object sender, EventArgs e)
{
this.button1.SendToBack();
this.button2.Dock = DockStyle.Top;
this.button3.Dock = DockStyle.Bottom;
this.listView1.Visible = false;
}
private void button3_Click(object sender, EventArgs e)
{
this.button1.Dock = DockStyle.Top;
this.button2.Dock = DockStyle.Top;
this.button3.Dock = DockStyle.Top;
this.button1.SendToBack();
this.listView1.Visible = false;
}
}
}
2010-01-02
treeview 的用法?
string[] mypicture = System.IO.Directory.GetFiles("" + Application.StartupPath + @"\picture", "*.*", System.IO.SearchOption.AllDirectories);
foreach (string mystr in mypicture)
{
string mypic = mystr.Substring(mystr.LastIndexOf("\\") + 1);
string myspilt=mypic.Substring(mypic.LastIndexOf('.')+1).ToLower();
if (myspilt == "jpg" || myspilt == "gif" || myspilt == "bmp")
{
this.treeView1.SelectedNode.Nodes.Add(mypic);
}
}
this.treeView1.SelectedNode.Expand();//展开所有节点;
2010-01-02
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人