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. 9 1739
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,
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,
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******** ******@TK2MSFTN GP10.phx.gbl... 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,
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******** ******@TK2MSFTN GP10.phx.gbl... 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,
When I look at your problem than I think that I would try to use a public
event on my forms and show and hide them according to that.
(They are all constructed of course so it will cost resources in my opinion)
Just an idea
Cor
JW,
When I look at your problem than I think that I would try to use a public
event on my forms and show and hide them according to that.
(They are all constructed of course so it will cost resources in my opinion)
Just an idea
Cor
Dear NG,
I have solved the problem (for the moment?) by getting rid of the array loop
and passing control between each form in the sequence somewhat like a linked
list. In this way I can display each form as modeless, whilst retaining the
main thread of execution with the currently visible form.
James.
"JW" <ne**@nospam.wo llaston.com> wrote in message
news:42******** **************@ news.optusnet.c om.au... 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.
Dear NG,
I have solved the problem (for the moment?) by getting rid of the array loop
and passing control between each form in the sequence somewhat like a linked
list. In this way I can display each form as modeless, whilst retaining the
main thread of execution with the currently visible form.
James.
"JW" <ne**@nospam.wo llaston.com> wrote in message
news:42******** **************@ news.optusnet.c om.au... 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" <ne**@nospam.wo llaston.com> wrote in message
news:42******** *************** @news.optusnet. com.au... 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.
Yes, but I think the point is that if the time it takes to construct is, say
1/10 the time it takes to paint, which it has to do anyway, the user will
not notice the difference (most people can't tell the difference between .5
seconds and .55 seconds.) Also, these systems are limited in memory, and on
most computers, general performance slows down if you overload the memory. I
think the only way to really know if it's noticeably faster one way or the
other is to do testing both ways (under whatever is a normal load for that
machine.)
Of course, it may be that an application does something time-consuming when
it loads before the paint. Like, say, establishing a wireless network
connection. That might well take more time than either the rest of
construction or painting, and would be worthwhile to do once outside of
creating the forms if the memory used by keeping the entire form around was
an issue. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Matt K. |
last post by:
Hi there,
I have a form in an Access project that contains a subform which
displays the results of a query of the style "select * from
where = #a certain date#". In the main part of the form
the user can change the date, which will force a requery in the
subform to bring up records from the date selected.
My question is this... The query in the subform is a very simple one,
with only three fields being returned. In the interest of...
|
by: Jon Pope |
last post by:
I've got an MDI Parent which hosts several child forms. When the
application closes (either through a File|Exit call or by clicking on the
"X" in the upper right corner), I check to see if any of the children are
"dirty" and display a "Save\Save All\Save None" form similar to Query
Analyzer.
I had thought about putting the code to display this form within the MDI
Parent's "Closing" event, but the children's closing events are called...
|
by: JW |
last post by:
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...
|
by: Peter Oliphant |
last post by:
How does one launch multiple forms in an application?
Using Photoshop as an example, this application seems to be composed of many
'disjoint' forms. Yet, they all seem somewhat 'active' in contrast to one of
them always being 'modal' (e.g., if you are moving over a picture the 'Info'
form will update the (x,y) screen location in realtime even if not the
selected form. Also note that this example implies the various forms can
communicate...
|
by: Terry |
last post by:
I have a Mainform with a Statusbar. When opening another form or doing some
processing I want to display info in the Statusbar of the Mainform. I have
read a lot of articles on this & have come up with the code below. It seems
to work(!!!) in that when coding the second form I can see the
DisplayStatusMsg of the main form. During debug the code runs through &
seemingly executes the call without error. But!...The message is not
displayed....
| |
by: morangolds |
last post by:
Hi,
I've been having a problem with C++ Windows Forms apps not "ending"
when you close the form window. I've searched about this problem all
over the place and most searches have lead me to believe that this has
to do with unreleased form component events or event handlers.
I'm comparatively new to .net and windows forms, in the sense that
though I've been using them for over 2 years now, it's been rather
sporadic. I work with...
|
by: MORALBAROMETER |
last post by:
Hallo,
I want to write a programming with c#.Net having forms like MS Word.
The main form A contain commonly used objects.I have many other forms
(B,C,D) etc that have inherited from A. i realised that when i want to
open B,or C while in any of the forms a completely new form like A, B,
C, or D is opened..that is two forms open at same time. This is
actually not what i want. I want a word style of form when documents
are open within the...
|
by: Academic |
last post by:
I have a MDI form, sometimes child forms and sometimes forms that are
neither
If I close the app the child forms closing and closed event happens followed
by the Mdi form receiving the events..
But the regular forms that are also open do not receive that event. This is
true whether there are child forms open or not.
|
by: =?Utf-8?B?UHVjY2E=?= |
last post by:
Hi, I'm using VS2005 and .net 2.0. I'm creating an application that has 3
forms. I want allow users to move forward and backward with the forms and
retain the data users have entered. I thought I'll make the inactive forms
invisible but this is creating a memory corruption problem when user close
the form2 or form3 and not the formMain.
My main form has a Next button which makes the main form invisible and
starts a new form which I'll...
|
by: =?Utf-8?B?RXRoYW4gU3RyYXVzcw==?= |
last post by:
I am (still) relatively new to Windows applications, most of my experience
has been Web based, and I am confused about what exactly happens when the
Main() method is called and how to manipulate forms opening & closing.
An example of this issue is as follows. I have a logon form open as the
first thing. The main functional form opens when a user has successfully
logged on. From the main form, a user should be able to logout which will...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |