Is there a way in .NET 2.0 to disable the control's UI updates, kind of like the LockWindowUpdate API?
Printable View
Is there a way in .NET 2.0 to disable the control's UI updates, kind of like the LockWindowUpdate API?
Are you talking about btn.enable = false or do you want to lock the entire form?
P.S. I'm not sure that i understand your question.
Just use the LockWindowUpdate API function. That function (or anything like it) would be OS-specific anyway so it's likely that there is no simple .net counterpart.
What's stopping you using it?
However some (though not many) controls (like listviews and similar) have methods called "BeginUpdate" and "EndUpdate" which accomplish the same thing.
aah okay
well I'm populating a list... was there an easy way to do this? maybe create the collection first and then add it to list :D?
I find it inefficient to add items one by one ... and Ihavent used .NET in ages so i cant remember anything
I'll try the beginUpdate method, thanks!