Click here to Skip to main content
15,898,134 members
Home / Discussions / C#
   

C#

 
QuestionAlpha numeric sorting for dataview/datatable Pin
avtar11117-Sep-08 19:27
avtar11117-Sep-08 19:27 
AnswerRe: Alpha numeric sorting for dataview/datatable Pin
Mycroft Holmes17-Sep-08 22:25
professionalMycroft Holmes17-Sep-08 22:25 
QuestionHow to use adapter when returned by the following function Pin
CPK_201117-Sep-08 19:00
CPK_201117-Sep-08 19:00 
AnswerRe: How to use adapter when returned by the following function Pin
N a v a n e e t h17-Sep-08 20:33
N a v a n e e t h17-Sep-08 20:33 
QuestionWindows Form allows click events on disable buttons ? Pin
nvngyl17-Sep-08 18:57
nvngyl17-Sep-08 18:57 
AnswerRe: Windows Form allows click events on disable buttons ? Pin
Steve Echols17-Sep-08 19:29
Steve Echols17-Sep-08 19:29 
GeneralRe: Windows Form allows click events on disable buttons ? Pin
nvngyl17-Sep-08 19:55
nvngyl17-Sep-08 19:55 
AnswerRe: Windows Form allows click events on disable buttons ? Pin
N a v a n e e t h17-Sep-08 20:56
N a v a n e e t h17-Sep-08 20:56 
When button1 is clicked, you are disabling button2 and starting a long running loop. This loop is running on the main thread where your UI elements are hosted. So it blocks all the messages passed to the window until your loop finishes. The click message is delivering to the window only after loop is finished and button is enabled. It processes the event and you get message. This is how it works.

As a workaround for this, you can run the long running loop on a separate thread. Here is a sample
button2.Enabled = false;
new System.Threading.Thread(delegate(object obj)
{
     long i = 0;
     while (i < 999999999){
        i++;
     }
     this.Invoke((MethodInvoker)delegate { button2.Enabled = true; });
}).Start();


All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia

How to use google | Ask smart questions

QuestionWin32 Shell Lightweight Utility API (shlwapi.dll) wrapper Pin
Paul Selormey17-Sep-08 18:48
Paul Selormey17-Sep-08 18:48 
AnswerRe: Win32 Shell Lightweight Utility API (shlwapi.dll) wrapper Pin
N a v a n e e t h17-Sep-08 20:58
N a v a n e e t h17-Sep-08 20:58 
GeneralRe: Win32 Shell Lightweight Utility API (shlwapi.dll) wrapper Pin
Paul Selormey17-Sep-08 21:33
Paul Selormey17-Sep-08 21:33 
QuestionNativeMethods is inaccesible due to its protection lavel Pin
amit_8317-Sep-08 18:44
amit_8317-Sep-08 18:44 
QuestionRe: NativeMethods is inaccesible due to its protection lavel Pin
Paul Selormey17-Sep-08 18:51
Paul Selormey17-Sep-08 18:51 
AnswerRe: NativeMethods is inaccesible due to its protection lavel Pin
Igor Velikorossov17-Sep-08 19:29
Igor Velikorossov17-Sep-08 19:29 
QuestionSystem.stackoverflowexception Pin
tauras8117-Sep-08 18:03
tauras8117-Sep-08 18:03 
AnswerRe: System.stackoverflowexception Pin
dybs17-Sep-08 18:13
dybs17-Sep-08 18:13 
GeneralRe: System.stackoverflowexception Pin
tauras8118-Sep-08 2:49
tauras8118-Sep-08 2:49 
QuestionBeginLoadData()????? Pin
Twyce17-Sep-08 17:33
Twyce17-Sep-08 17:33 
AnswerRe: BeginLoadData()????? Pin
Harvey Saayman17-Sep-08 21:03
Harvey Saayman17-Sep-08 21:03 
QuestionPowerPoint Automation Pin
Patrick Kilgore17-Sep-08 12:20
Patrick Kilgore17-Sep-08 12:20 
Questionhow can i get the root folder for my program after setup Pin
ahmedhassan9617-Sep-08 11:26
ahmedhassan9617-Sep-08 11:26 
AnswerRe: how can i get the root folder for my program after setup Pin
DaveyM6917-Sep-08 11:35
professionalDaveyM6917-Sep-08 11:35 
GeneralRe: how can i get the root folder for my program after setup Pin
ahmedhassan9617-Sep-08 12:21
ahmedhassan9617-Sep-08 12:21 
QuestionMigration from C# to java Pin
Monika Patel17-Sep-08 10:41
Monika Patel17-Sep-08 10:41 
QuestionHow to use rtf table of contents in RichTextBox Pin
panoskatws17-Sep-08 9:45
panoskatws17-Sep-08 9:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.