English 中文(简体)
c 窗口表未能对点击行动做出回应
原标题:c# windows form fails to respond on a click action

我有一个WindowsForm项目,如果数据收集和数据收集,将有两个项目进行测试:。 这些数字似乎在ok,但在我增加研究所收集数据的功能时,在试图绘制现有数据时冻结表格。

在点击第一吨时,数据以新格式窗口和清单箱列出。 在这一新窗口上,我有另一个数据库,如果数据看起来ok,则用于图表。

这是整个项目冻结的情况。 我试图不软拷贝我通过的新表格中的班级参考资料,而是在建筑商内部制造新的物体。 只要数据收集<代码>BackgroundWorker不运行,该数据似乎正在发挥作用。 当收集时,点击地纽州冻结表格,数据显示纽州只做罚款。

private void wellStatusButton1_Click(object sender, EventArgs e)
{
     try
     {
        ListDataForm temp = new ListDataForm(tubes[0], 1);
        temp.ShowDialog();
     }
     catch (Exception ex)
     {
        MessageBox.Show(ex.Message);
     }
  }

private void plotDataButton_Click(object sender, EventArgs e)
{
     try
     {
        GraphForm plotData = new GraphForm(at);
        plotData.ShowDialog();
     }
     catch (Exception ex)
     {
        MessageBox.Show(ex.Message);
     }
}
问题回答

It is hard to get much information from your question, but one thing that might be useful to you is this: When a windows program is doing something else in the background, usually the UI may be frozen. You can try using: Application.DoEvents() periodically, that will allow the UI to appear more responsive.





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签