473,395 Members | 1,458 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Redrawing issue


Hi All,
I have an application that on a button click parse an existing txt file and
creates a new file with some other information.The operation its quite
lenghty. If the file already exist I prompt the user if they want to
overwrite the existing file. If the user chooses to go ahead the parser
processor starts.
Here is the problem... The messagebox get stuck to the screen and does not
look very nice. With the C++,MFC I used to redraw the screen to avoid this
problem, how can I do it in C#?

Thanks for your time and any help is appreciated.
Frank


Nov 16 '05 #1
3 1042
Hi Frank,

Maybe you should run the parser in separate thread.

--
Regards,
Peter Jausovec
(http://blog.jausovec.net)
"Zagor" <za***@sympatico.ca> wrote in message
news:eY*************@TK2MSFTNGP11.phx.gbl...

Hi All,
I have an application that on a button click parse an existing txt file
and creates a new file with some other information.The operation its quite
lenghty. If the file already exist I prompt the user if they want to
overwrite the existing file. If the user chooses to go ahead the parser
processor starts.
Here is the problem... The messagebox get stuck to the screen and does
not look very nice. With the C++,MFC I used to redraw the screen to avoid
this problem, how can I do it in C#?

Thanks for your time and any help is appreciated.
Frank

Nov 16 '05 #2
Zagor,

It sounds like you are not using multithreading to help you out here.
What I would do is perform the check for the file in the UI (it shouldn't
take that long), and if they want to continue, put the operation on another
thread. This way, your UI should be responsive, and you shouldn't have a
problem with having to refresh or redraw.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Zagor" <za***@sympatico.ca> wrote in message
news:eY*************@TK2MSFTNGP11.phx.gbl...

Hi All,
I have an application that on a button click parse an existing txt file
and creates a new file with some other information.The operation its quite
lenghty. If the file already exist I prompt the user if they want to
overwrite the existing file. If the user chooses to go ahead the parser
processor starts.
Here is the problem... The messagebox get stuck to the screen and does
not look very nice. With the C++,MFC I used to redraw the screen to avoid
this problem, how can I do it in C#?

Thanks for your time and any help is appreciated.
Frank

Nov 16 '05 #3

I think you guys are right in suggesting to start the parser in a new
thread.

Thanks
Frank

Hi All,
I have an application that on a button click parse an existing txt file
and creates a new file with some other information.The operation its quite
lenghty. If the file already exist I prompt the user if they want to
overwrite the existing file. If the user chooses to go ahead the parser
processor starts.
Here is the problem... The messagebox get stuck to the screen and does
not look very nice. With the C++,MFC I used to redraw the screen to avoid
this problem, how can I do it in C#?

Thanks for your time and any help is appreciated.
Frank

Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Otie | last post by:
I have a circle that displays information in 1-degree increments - there are 90 such increments that comprise the circle. I need a pointer within the circle that rotates. The pointer must include...
7
by: George Hester | last post by:
Please take a look at this google artcle: http://groups.google.com/groups?hl=en&lr=&frame=right&th=55d6f4b50f5f9382&seekm=411f370d%241%40olaf.komtel.net#link9 The op was having trouble with...
2
by: Anthony Cuttitta Jr. | last post by:
We have an application that outputs several different graphs from data downloaded from our AS400. The application has worked without (this) issue for several months now, but just recently, the...
2
by: Ben Rush | last post by:
Hello World, Okay, I have spent the day browsing the newsgroups and reading up on article after article concerning ViewState corruption and so forth, and I have a couple questions. We...
1
by: oscar | last post by:
my program draws a form and when you click the start button another form is drawn with a progress bar as it runs through a function. my issue is that when you click on another progrem then try to...
5
by: Michel | last post by:
How to force the redrawing of a Form?
7
by: Dino Buljubasic | last post by:
Hi, I am using C# 2.0 (VS2005) to build my user control that contains a number of dynamically loaded ListViews. ListViewItems have their ForeColor properties set to either black or blue to...
4
by: Sugan | last post by:
Hi all, I've created a Custom button control and i'm drawing the graphics for the button when the paint event is fired. I used Invalidate method to redraw the graphics in events like mousemove,...
13
by: SAL | last post by:
Hello, I'm trying to include a popup in the ItemTemplate of a gridview row. The ItemTemplate for the field contains a textbox and when the user clicks in the textbox I want a popup panel to show...
1
by: NCC | last post by:
Hi all, In Access VB I could call echo() to stop my form from redrawing during computations then have it redraw upon completion. Is there a method for this in Visual C# or the .net framework.? ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
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...
0
jinu1996
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...
0
tracyyun
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 using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.