Values between windows forms in C# .NET(C# .NET 中窗口窗体之间的值)
问题描述
我有两种形式,主要的一种有一个水晶报表查看器,另一种是用户介绍他想在报告中出现的用户的 ID.问题我希望用户在报表加载信息之前引入ID,所以当用户在报表加载信息之前单击CreateReport按钮时,我创建了一个新表单来引入ID,问题是指令继续即使新窗口打开也执行.我知道是逻辑问题而不是程序问题,也许您可以帮助我=).我在表单中创建了一个构造函数,以便可以传递值.
I have two forms, in the main one a have a crystalreportviewer and in the other one the user introduces the ID of the user he wants to be on the report. The problem I want the user to introduce the ID before the report loads the information, so when the user clicks the CreateReport button just before the report loads the info, I created a new form to introduce the ID, the problem is that instructions continue to execute even though the new window is open. I know is a problem of logic instead of programmin maybe you can help me =). I made a constructor in the form so the values can be passed.
这里是按钮的代码:
private void usuariosToolStripMenuItem_Click(object sender, EventArgs e)
{
RPE formRPE = new RPE(); //NEW FORM CREATED
frmRPE.Show();//RPE FORM CALLED
this.Hide();
//BUT IT GOES ON
ReportDocument guantesRpt = new reporteGuantes();
DataTable datatableGuantes = reporteguantes.obtenerTabla();
guantesRpt.SetDataSource(datatableGuantes);
rptViewerGuantes.ReportSource = guantesRpt;
// Usuariorpt.SetParameterValue("RPE", RPE);
}
推荐答案
ShowDialog(...)
ShowDialog(...)
这篇关于C# .NET 中窗口窗体之间的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:C# .NET 中窗口窗体之间的值


基础教程推荐
- 首先创建代码,多对多,关联表中的附加字段 2022-01-01
- 经典 Asp 中的 ResolveUrl/Url.Content 等效项 2022-01-01
- 将事件 TextChanged 分配给表单中的所有文本框 2022-01-01
- 错误“此流不支持搜索操作"在 C# 中 2022-01-01
- JSON.NET 中基于属性的类型解析 2022-01-01
- 从 VS 2017 .NET Core 项目的发布目录中排除文件 2022-01-01
- 在 VS2010 中的 Post Build 事件中将 bin 文件复制到物 2022-01-01
- 是否可以在 asp classic 和 asp.net 之间共享会话状态 2022-01-01
- 全局 ASAX - 获取服务器名称 2022-01-01
- 如何动态获取文本框中datagridview列的总和 2022-01-01