显示数组中的表单而不关闭每个表单 [英] Displaying forms in an array without closing each form

查看:54
本文介绍了显示数组中的表单而不关闭每个表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的NG,


仍在使用我的.NET CF C#表单应用程序...


我有一系列表单我希望以数组顺序显示,因此

创建了一个循环来运行它们。由于功能和速度原因(这个应用程序将被部署到PocketPC)我只想隐藏()

当用户完成它时,而不是允许它

关闭()。以这种方式,用户可以退回。按钮返回每个

以前的表格,保留其状态(功能),每个表单只需创建一次而不是一次创建/销毁的常量创建/销毁需求

(小)处理器(速度)。


问题:如果我在每个表单上调用ShowDialog(),我必须为每个表单调用Close() />
表单将控件返回到数组,以便显示下一个表单。

如果我只调用Show(),结果表单不是模态的,所以数组循环

以欢快的方式显示下一个(以及下一个,下一个等)

表格。


此时我假设解决方案将涉及创建一个新的

线程,在其中显示每个表单,而主线程等待

通知它可以继续? (因为这可能是我在Java中接近问题的原因吗?)


有没有办法实现这一目标我缺少或者我有线程

我的出路是什么?


很多TIA,


詹姆斯。

Dear NG,

Still working on my .NET CF C# forms application ...

I have an array of forms that I wish to display in array order, and thus
have created a loop to run through them. Due to functional and speed
reasons (this app. will be deployed to a PocketPC) I want to merely Hide()
each form when the user is finished with it, rather than allow it to
Close(). In this way the user can "back" button their way back to each
previous form which has retained its state (functional), and each form is
only created once rather than a constant create/destroy demand on the
(small) processor (speed).

Problem: if I call ShowDialog() on each form I have to call Close() for each
form to return control to the array so that the next form can be displayed.
If I only call Show() the resulting form is not modal and so the array loop
goes on its merry way displaying the next (and the next, and the next etc.)
form.

At this point I am assuming that the solution will involve creating a new
thread in which to display each form, whilst the main thread waits to be
notified that it can continue? (because this is maybe how I would approach
the problem in Java?)

Is there some way to achieve this that I am missing or do I have to thread
my way out of this one?

Many TIAs,

James.

推荐答案

JW,


在你的留言中有触发我的东西。构建表单成本

时间。

我认为当你将它与绘制表单进行比较时,情况并非如此。


在每个

系统中,构造将通常是绘画中的一小部分。


这可以让你在创建内存之前以另一种方式思考

解决方案在您的掌上电脑上。


Cor
JW,

In your message is something that triggers me. Constructing a form cost
time.
I think that is not true when you compare that with painting a form.

The constructing will normaly be a fraction from the painting in every
system.

That to let you think in another way before you create a memory consuming
solution on your pocket PC.

Cor


JW,


在你的信息中是触发我的东西。构建表单成本

时间。

我认为当你将它与绘制表单进行比较时,情况并非如此。


在每个

系统中,构造将通常是绘画中的一小部分。


这可以让你在创建内存之前以另一种方式思考

解决方案在您的掌上电脑上。


Cor
JW,

In your message is something that triggers me. Constructing a form cost
time.
I think that is not true when you compare that with painting a form.

The constructing will normaly be a fraction from the painting in every
system.

That to let you think in another way before you create a memory consuming
solution on your pocket PC.

Cor


Cor,


非常感谢你的回复。


即使我考虑到你对建筑成本的评价与

重画成本的关系,也不是'无论是否b / b,我是否一直在构建新表格或重复使用现有表格?重新计算所产生的重新绘制成本?

也就是说,需要绘制任何新表格(这是第一次

吧?


James。


" Cor Ligthert" <无************ @ planet.nl>在消息中写道

news:ur ************** @ TK2MSFTNGP10.phx.gbl ...
Cor,

Many thanks for your reply.

Even if I factor in your comments about the cost of construction versus the
cost of repainting, isn''t the cost of repainting incurred regardless of
whether or not I construct new forms all the time or reuse existing ones?
That is, any new form needs to be painted (made visible) for the first time
anyway?

James.

"Cor Ligthert" <no************@planet.nl> wrote in message
news:ur**************@TK2MSFTNGP10.phx.gbl...
JW,
在你的信息中是触发我的东西。构建一个表单的成本
时间。
我认为当你将它与绘制一个表单进行比较时,这是不正确的。

构造将通常是绘画中的一小部分<系统。

在你的掌上电脑上创建一个消耗内存的解决方案之前,让你以另一种方式思考。

Cor
JW,

In your message is something that triggers me. Constructing a form cost
time.
I think that is not true when you compare that with painting a form.

The constructing will normaly be a fraction from the painting in every
system.

That to let you think in another way before you create a memory consuming
solution on your pocket PC.

Cor



这篇关于显示数组中的表单而不关闭每个表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆