Click here to Skip to main content
15,894,343 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: I have this task but I don't know what I should do , Please help me. (get Factor) Pin
Richard MacCutchan6-Feb-11 1:35
mveRichard MacCutchan6-Feb-11 1:35 
GeneralRe: I have this task but I don't know what I should do , Please help me. (get Factor) Pin
#realJSOP7-Feb-11 5:20
mve#realJSOP7-Feb-11 5:20 
AnswerRe: I have this task but I don't know what I should do , Please help me. (get Factor) Pin
Abhinav S7-Feb-11 6:42
Abhinav S7-Feb-11 6:42 
AnswerRe: I have this task but I don't know what I should do , Please help me. (get Factor) Pin
Bernhard Hiller8-Feb-11 0:46
Bernhard Hiller8-Feb-11 0:46 
QuestionTab Control Page Not Responding Fast Enough Pin
Member 22565334-Feb-11 4:54
Member 22565334-Feb-11 4:54 
AnswerRe: Tab Control Page Not Responding Fast Enough Pin
Yusuf4-Feb-11 5:33
Yusuf4-Feb-11 5:33 
GeneralRe: Tab Control Page Not Responding Fast Enough Pin
Member 22565334-Feb-11 5:39
Member 22565334-Feb-11 5:39 
AnswerRe: Tab Control Page Not Responding Fast Enough Pin
Luc Pattyn4-Feb-11 6:19
sitebuilderLuc Pattyn4-Feb-11 6:19 
I guess the Controls (DGVs) that haven't been visible yet (those not on the first tab page) still haven't been rendered at all; so clicking on a tab will first cause the DGV to be actually created (including its Handle property), then the data being loaded into it.

You could force this to happen sooner, IIRC reading Control.Handle suffices to make sure it really exists. Of course adding this to your Form.Load (or Shown) event will postpone its rendering of everything, including the first tab.

A better way to handle the situation could be this, and I would recommend it anyway whenever the database accesses might take more than a second:
- launch a thread to access the database, do not touch the Controls from that thread;
- in the mean time, make sure all Controls really exist (Handle!);
- when the database thread is done, make it signal the GUI thread and start showing the data.
A BackgroundWorker would be good, having the DB stuff in its DoWork and the show-in-GUI stuff in its RunWorkercompleted handler.

Smile | :)
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.

AnswerRe: Tab Control Page Not Responding Fast Enough Pin
GenJerDan4-Feb-11 9:57
GenJerDan4-Feb-11 9:57 
Questionnet framework installation Pin
siaswar3-Feb-11 11:27
siaswar3-Feb-11 11:27 
AnswerRe: net framework installation Pin
Roger Wright3-Feb-11 11:40
professionalRoger Wright3-Feb-11 11:40 
AnswerRe: net framework installation Pin
RobCroll3-Feb-11 13:21
RobCroll3-Feb-11 13:21 
AnswerRe: net framework installation Pin
Luc Pattyn3-Feb-11 14:06
sitebuilderLuc Pattyn3-Feb-11 14:06 
GeneralRe: net framework installation Pin
RobCroll3-Feb-11 14:51
RobCroll3-Feb-11 14:51 
AnswerRe: net framework installation Pin
Abhinav S4-Feb-11 0:14
Abhinav S4-Feb-11 0:14 
QuestionEventing and Memory leaks Pin
RobCroll2-Feb-11 5:04
RobCroll2-Feb-11 5:04 
AnswerRe: Eventing and Memory leaks Pin
Luc Pattyn2-Feb-11 5:17
sitebuilderLuc Pattyn2-Feb-11 5:17 
AnswerRe: Eventing and Memory leaks Pin
Eddy Vluggen2-Feb-11 7:29
professionalEddy Vluggen2-Feb-11 7:29 
GeneralRe: Eventing and Memory leaks Pin
RobCroll2-Feb-11 14:02
RobCroll2-Feb-11 14:02 
GeneralRe: Eventing and Memory leaks Pin
Nitin Singh India26-Mar-11 10:11
Nitin Singh India26-Mar-11 10:11 
QuestionListview groups Pin
Herboren1-Feb-11 6:23
Herboren1-Feb-11 6:23 
AnswerRe: Listview groups Pin
Eddy Vluggen1-Feb-11 7:08
professionalEddy Vluggen1-Feb-11 7:08 
Question[Solved] DropDown doesn't drop down [modified] Pin
lukeer1-Feb-11 4:51
lukeer1-Feb-11 4:51 
AnswerRe: DropDown doesn't drop down Pin
Eddy Vluggen1-Feb-11 7:10
professionalEddy Vluggen1-Feb-11 7:10 
GeneralRe: DropDown doesn't drop down Pin
lukeer1-Feb-11 20:47
lukeer1-Feb-11 20:47 

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.