Click here to Skip to main content
12,299,527 members (55,257 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C#3.5
When i click on button code executes correct but takes some time and " Not Responding Message" appears at form title bar
Posted 31-Jul-12 18:32pm

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

Your application is single threaded. While it is running it's task, there is no thread to keep responding to windows messages. If you perform your task in another thread, then you won't see that message while it is running. A cheaper option is to add the line Application.DoEvents() inside whatever loops your app is running, which will cause it to process messages each time it gets there.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160525.2 | Last Updated 1 Aug 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100