ListBox中双击一项就弹出一个窗体显示怎么实现? 如题;我是想实现先查询,在listBox中显示,然后双击一项,就打开一个窗体或对话框,显示我所选定的文件,还请诸位高手帮忙 ps:我的文件是文本的.txt 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 private void listBox1_DoubleClick(object sender, System.EventArgs e) { switch(this.listBox1.SelectedIndex) { case 0: MessageBox.Show("1"); break; case 1: MessageBox.Show("2"); break; case 2: MessageBox.Show("3"); break; default: MessageBox.Show("4"); break; } } <html> <head> <title>BrioAll</title> <meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1"> <meta name="CODE_LANGUAGE" Content="C#"> <meta name=vs_defaultClientScript content="JavaScript"> <meta name=vs_targetSchema content="http://schemas.microsoft.com/intellisense/ie5"> <script> function openw() { window.open("","","") } </script> </head> <body MS_POSITIONING="GridLayout"> <form id="Form1" method="post" runat="server"> <table border=0></table><asp:ListBox ID=aa Runat=server ondblclick=openw()> <asp:ListItem Value =a>a</asp:ListItem><asp:ListItem Value=b>b </asp:ListItem></asp:ListBox> </form> </body></html> trendChart是一个窗体的实例,初始值为null if (trendChart == null || trendChart.IsDisposed == true) { trendChart = new TrendChart(); trendChart.MdiParent = this; trendChart.Parent = this.panelEx2; trendChart.Show(); } else { trendChart.Show(); trendChart.WindowState = FormWindowState.Maximized; } IFRAME加载JS控制的CSS,请问怎么弄? 请问winform中我怎样让textbox的宽度随着我拖动Form的宽度而自动改变 被编译到二进制代码里 问一个点击按钮显示数据的问题 c#串口通信的问题 如何用C#.net开发一个类似瑞星kaka助手的小程序? 数据库连接 为什么页面刷新会调用DataGrid1_EditCommand事件 为什么事件抛出的异常捕获不到 在不同显示器分辨率下,web页面现实的问题 ComboBox下拉列表的问题,在线急等!!!谢谢 问下关于C#的类型实现
{
switch(this.listBox1.SelectedIndex)
{
case 0:
MessageBox.Show("1");
break;
case 1:
MessageBox.Show("2");
break;
case 2:
MessageBox.Show("3");
break;
default:
MessageBox.Show("4");
break;
}
}
<head>
<title>BrioAll</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name=vs_defaultClientScript content="JavaScript">
<meta name=vs_targetSchema content="http://schemas.microsoft.com/intellisense/ie5">
<script>
function openw()
{
window.open("","","")
}
</script>
</head>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<table border=0></table>
<asp:ListBox ID=aa Runat=server ondblclick=openw()> <asp:ListItem Value =a>a</asp:ListItem>
<asp:ListItem Value=b>b </asp:ListItem>
</asp:ListBox>
</form>
</body>
</html>
if (trendChart == null || trendChart.IsDisposed == true)
{
trendChart = new TrendChart();
trendChart.MdiParent = this;
trendChart.Parent = this.panelEx2;
trendChart.Show();
}
else
{
trendChart.Show();
trendChart.WindowState = FormWindowState.Maximized;
}