Hi,
I have a small windows form. This has 2 labels and a button. When a
user presses a button, I copy a large file. Nowwhen the copy is going
on, if I switch windows, my main window becomes white. How can I retain
the values of the screen when switching between the windows?
Thanks. 4 1651
You can copy asynchronously or in separate thread
HTH
Alex
<db*****@gmail.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com... Hi,
I have a small windows form. This has 2 labels and a button. When a user presses a button, I copy a large file. Nowwhen the copy is going on, if I switch windows, my main window becomes white. How can I retain the values of the screen when switching between the windows?
Thanks.
Well that make sense. But I remember reading (I think it was game
programming in c#) that there is a method that get invoked every time
the windows switch happen or something or repaint and all you have to
do is repaint all the elements, I am not sure. Well, I will search, if
nothing work out I will take the async approach.
Thanks.
<db*****@gmail.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com... Well that make sense. But I remember reading (I think it was game programming in c#) that there is a method that get invoked every time the windows switch happen or something or repaint and all you have to do is repaint all the elements, I am not sure. Well, I will search, if nothing work out I will take the async approach.
The thread is probably the preferred method but if you are copying chunks at
a time using a filestream you can just put an Application.DoEvents in there.
Michael db*****@gmail.com wrote: Well that make sense. But I remember reading (I think it was game programming in c#) that there is a method that get invoked every time the windows switch happen or something or repaint and all you have to do is repaint all the elements, I am not sure. Well, I will search, if nothing work out I will take the async approach.
Well, the method which gets invoked when you swith windows is form.activate/form.deactivate which
you can wire and call Invalidate() on the form. I doubt it would help you as copying might involve
lots of resources. I would go for a async copying.
Thank you
Andrey This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Duncan Mole |
last post by:
Hi,
I have created a control which draws a title bar and provides a drop down
menu for a Smart Device Application. It seemed to work fine until I came to
add an event handler to act on Paint...
|
by: Serge Klokov |
last post by:
Hi!
1. Please, help with example "paint on form by mouse"
2. Below is my example, but it clear the line after each Refresh()... how to
fix?
3. How to draw the line in Mouse_Move event?
...
|
by: jcrouse |
last post by:
I am rotating some text is some label controls. In the one place I use it it
works fine. In the other place I use it I can't figure out the syntax. I
don't really understand the event. Where it...
|
by: Kürşat |
last post by:
Hi all,
I do some drawing in a form's paint event handler and I have a button on
that form. Whenever the mouse enters or leaves the button Form's paint event
occurs. Isn't that a strange...
|
by: Rotsey |
last post by:
Hi,
I have a interface that I use for a form so I can pass the form
to another object.
How do I add the Paint event to the interface and subsequently
handle the paint event in my other...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
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,...
|
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...
|
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,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
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...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |