Click here to Skip to main content
12,892,015 members (53,514 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
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.

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.170424.1 | Last Updated 1 Aug 2012
Copyright © CodeProject, 1999-2017
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