|
There is no other way. Running the long running job on new thread is the way to go. Because both the message handling code and long running code are getting executed on the main thread. Which means either one can execute at a time. Since the long running job is blocking the thread, main thread will be in waiting state and your message processing code won't get executed.
Why do you think BeginInvoke is not performing well? Do you have benchmarks which shows BeginInvoke is slow?
Best wishes,
Navaneeth
|
|
|
|
|
That is a bad idea. As others have said, your long operation needs to move to another thread. There are a couple of ways to do that, the best choice depends on the operations. What is it you are doing? How long does it take, and how often does your code need to access the GUI in that time?
BTW1: I don't use Control.BeginInvoke() ; when I need invoking, I use Control.Invoke() .
BTW2: IMO a long operation needs a way to get cancelled (the user sits there waiting and has the time to change his mind); and a progress bar is also nice to have. These are additional reasons to do things properly, i.e. with an extra thread.
|
|
|
|
|
I'll download program of PKI C#(asp.net),who can tell me the url?
|
|
|
|
|
Shhhh. I'm going to let you in on one of the biggest secrets in the IT industry. You have to promise that you won't let anybody else know though, because this secret is only meant to be used by people who have been world renowned developers for more than 10 years. You seem like a nice chap though so I'll let you in on it.
Are you ready?
Well, there's this secret site where you can type in details of what you are looking for and if you click the Search button it goes off and looks for things that it thinks match. It's really, really clever, but we don't want just anyone to know about it. Just think of the havoc that could be wreaked if the uninitiated knew about it. All sorts of people would be able to find things.
Anyway, just for you, follow this[^] link.
|
|
|
|
|
I'm deeply disappointed POH, that really deserved a LMGTFY, still your response was funnier!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I toyed with the LMGTFY option, but decided there was more humour doing it this way.
|
|
|
|
|
Oh no, now you've done it, you've uncovered the ultimate source, the never ebbing eternal fountain of wisdom and knowledge. Q&A will soon be a deserted and sullen place, now that you betrayed us by disclosing the source. May the wrath of the hamsters come over you and your hands that typed the betrayal shall dry up and wither, crumbling to dust. The apocalypse is near and CP will fade into the shadows as all good will be destroyed.
I hope you at least enjoyed your treachery!
"With sufficient thrust, pigs fly just fine."
Ross Callon, The Twelve Networking Truths, RFC1925
|
|
|
|
|
That's fine - at least we can eat the dust. It's got zero calories.
|
|
|
|
|
Don't get fooled by urban legends such as the Google one. For serious answers, you need a mature source[^] of information, not a modern beta thingy.
|
|
|
|
|
Pah, 'tis a child. Verily ye must search the mists of dark lore[^].
|
|
|
|
|
What's on? spring cleaning? you seem to be handing out all your secrets now...
|
|
|
|
|
Pete O'Hanlon wrote: 'tis a child
Not sure what you mean here, mind you, the question was asked by the president of the United States if one can trust the pop-up.
|
|
|
|
|
... and then verify an URL with The Holistic[^], the most useless search engine ever.
Greetings - Jacek
|
|
|
|
|
|
thanks! i'll look for tell me URL!
|
|
|
|
|
I want to make a project on topic Bug Tracking, but I want more information about my topic.
Could you please help me for my project..
|
|
|
|
|
priyanka kulkarni wrote: I want to make a project on topic Bug Tracking, but I want more information
about my topic.
Why? If you want to write a bug tracking application, surely you have some requirements already? Surely you know what problem you are trying to solve.
You should never, ever, start developing software based purely off the title of an application. You need to find out what people want from your software. Talk to the people who will use this software, find out how they want to use it and then prioritise your development based on that. Not all features will make it in because often what you will hear as requirements tend to just be wish list for one particular user. If you hear the same feature from lots of users though, it would seem wise to prioritise that in your development. Good luck.
|
|
|
|
|
|
Wiki[^] would provide a good start.
|
|
|
|
|
Hi All,
How i can get the pressed key from KeyboardFocusChangedEventArgs Event.
Regards
|
|
|
|
|
Oh please let me, I know where you can find out try this amazing tool [^]
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
really amazing....
|
|
|
|
|
Hi all,
I am having a PropertyGrid on a user control. during updating a property value if a press escape my value got updated automatically. I want to stop this functionality pls suggest. For this i write KeyDown and PreviewKeyDown event of my property grid But when i press ESCAPE key none from these two events called although the others keys are working fine on both of these events but only ESCAPE is giving problem.
Please HELP .... !!
Regards
Pankaj Sood
|
|
|
|
|
I have built a program with multiple DataTables and using multiple dimensions for the DataSets. The tables have about 10,000 records and are about 30 levels deep.
I am considering changing this whole scheme to make the DataSets 10000 tables deep and records 30. This makes it better for Adding, deleting, and moving records.
I read the Maximum columns and records for DataTables are 2,147,483,647. However I have not found anything that says there is a maximum number of tables in a dimension of a DataSet. Can anyone tell me if there is and if there is any problem I may wish to consider with the above.
Thanks in advance.
Michael
modified 26-Mar-12 23:23pm.
|
|
|
|
|
Opinion - you are heading for a disaster!
I don't know your data design but if you are pushing the limits of the container then you are doing something terrible wrong.
I NEVER return more than 1 table at a time from the database, very early on I once got 3 table in the same dataset and the response time was abysmal, getting 3 tables separately was dramatically faster.
I always use the HeirarchyID principle (but as a string not a HeirarchyID) /Parent/C1/C2/C3/C4/ your can then identify the position in the structure and the parentage of any element from the content of the heirarchyid.
Never underestimate the power of human stupidity
RAH
|
|
|
|