Click here to Skip to main content
16,020,622 members
Home / Discussions / Windows Forms
   

Windows Forms

 
GeneralRe: SQL query worked fine... until I tried it in Visual Studio 2008 Pin
Dave Kreskowiak17-Jun-09 13:33
mveDave Kreskowiak17-Jun-09 13:33 
GeneralRe: SQL query worked fine... until I tried it in Visual Studio 2008 Pin
Andrew Tamberino17-Jun-09 14:23
Andrew Tamberino17-Jun-09 14:23 
GeneralRe: SQL query worked fine... until I tried it in Visual Studio 2008 Pin
Dave Kreskowiak17-Jun-09 18:03
mveDave Kreskowiak17-Jun-09 18:03 
GeneralRe: SQL query worked fine... until I tried it in Visual Studio 2008 Pin
Andrew Tamberino18-Jun-09 9:54
Andrew Tamberino18-Jun-09 9:54 
Questionhow do i use textbox value from one form on another to access database without releasing the resource(value) Pin
ChiSmile17-Jun-09 7:35
ChiSmile17-Jun-09 7:35 
QuestionPropertyGrid control slow to load because it automatically "reflects" on all controls in current application ? Pin
BillWoodruff17-Jun-09 3:00
professionalBillWoodruff17-Jun-09 3:00 
AnswerRe: PropertyGrid control slow to load because it automatically "reflects" on all controls in current application ? Pin
led mike17-Jun-09 4:40
led mike17-Jun-09 4:40 
GeneralRe: PropertyGrid control slow to load because it automatically "reflects" on all controls in current application ? Pin
BillWoodruff17-Jun-09 5:07
professionalBillWoodruff17-Jun-09 5:07 
Hi Led Mike,

I am also asking "huh" Smile | :)

And I first assumed it was something I was doing, also. I first was using the ProperyGrid on a separate form as a "floating window" where the form it was on had its Parent property set to the Main Form.

So my first hypothesis was that perhaps the dynamic communication between the two forms was causing some complex interop and marshalling of data back and forth.

So I moved the PropertyGrid directy onto the Main Form : same problem.

So then, assuming the fact I had some controls in the "virtual cells" of tableLayoutPanel, and that accessing perhaps are causing the delay, I ripped out the tableLayoutPanel, just put a few simple controls on the main form, and tested again : still a long delay after the first control is set as the SelectedObject for the PropertyGrid and the PropertyGrid becomes usable.

I have read elsewhere that the PropertyGrid ... at desgn time ... is using reflection to discover the attributes of controls or forms.

Using the principle of Occam's Razor, the simplest hypothesis is that when the control is set, when it's instantiated at run-time : it does a recursive walk through the inner object tree of the app and uses reflection to discover all control objects and their inner list of propertes to edit for each control.

If it didn't parse them first, and then somehow "cache" the clusters of properties, which can vary from control to control, how could it suddenly switch from being non-responsive for over 10 seconds to performing consistently fast as you're editing even such complex properties as the number of columns in a TableLayoutPanel ? And jumping from control to control, it remains fast after that initial load penalty.

But I do note that when used at run-time the Property Grid will omit any special UI Editors for collections and such : I consider that it doesn't break on those to be a "feature."

best, Bill

"Many : not conversant with mathematical studies, imagine that because it [the Analytical Engine] is to give results in numerical notation, its processes must consequently be arithmetical, numerical, rather than algebraical and analytical. This is an error. The engine can arrange and combine numerical quantities as if they were letters or any other general symbols; and it fact it might bring out its results in algebraical notation, were provisions made accordingly." Ada, Countess Lovelace, 1844

GeneralRe: PropertyGrid control slow to load because it automatically "reflects" on all controls in current application ? Pin
led mike17-Jun-09 5:48
led mike17-Jun-09 5:48 
GeneralRe: PropertyGrid control slow to load because it automatically "reflects" on all controls in current application ? Pin
BillWoodruff17-Jun-09 6:02
professionalBillWoodruff17-Jun-09 6:02 
GeneralRe: PropertyGrid control slow to load because it automatically "reflects" on all controls in current application ? Pin
DaveyM6917-Jun-09 6:11
professionalDaveyM6917-Jun-09 6:11 
GeneralRe: PropertyGrid control slow to load because it automatically "reflects" on all controls in current application ? Pin
led mike17-Jun-09 6:20
led mike17-Jun-09 6:20 
Generalto Led Mike and DaveyM69 : Re: PropertyGrid control slow to load because it automatically "reflects" on all controls in current application ? Pin
BillWoodruff17-Jun-09 11:06
professionalBillWoodruff17-Jun-09 11:06 
GeneralRe: to Led Mike and DaveyM69 : Re: PropertyGrid control slow to load because it automatically "reflects" on all controls in current application ? Pin
Scott Dorman17-Jun-09 12:57
professionalScott Dorman17-Jun-09 12:57 
GeneralRe: to Led Mike and DaveyM69 : Re: PropertyGrid control slow to load because it automatically "reflects" on all controls in current application ? Pin
BillWoodruff17-Jun-09 19:54
professionalBillWoodruff17-Jun-09 19:54 
QuestionHow to hook up a VScrollBar to a control? Pin
Alan Burkhart16-Jun-09 19:00
Alan Burkhart16-Jun-09 19:00 
AnswerRe: How to hook up a VScrollBar to a control? Pin
Eslam Afifi17-Jun-09 1:03
Eslam Afifi17-Jun-09 1:03 
Questionget Operating System name using c# Pin
myms.net15-Jun-09 21:17
myms.net15-Jun-09 21:17 
AnswerRe: get Operating System name using c# Pin
Luc Pattyn15-Jun-09 23:06
sitebuilderLuc Pattyn15-Jun-09 23:06 
AnswerRe: get Operating System name using c# Pin
dan!sh 17-Jun-09 2:56
professional dan!sh 17-Jun-09 2:56 
AnswerRe: get Operating System name using c# Pin
DaveyM6917-Jun-09 5:26
professionalDaveyM6917-Jun-09 5:26 
GeneralRe: get Operating System name using c# Pin
dan!sh 18-Jun-09 6:04
professional dan!sh 18-Jun-09 6:04 
QuestionDefault TitleBar move behavior of a Form set as a child of another Form odd ? Pin
BillWoodruff15-Jun-09 20:39
professionalBillWoodruff15-Jun-09 20:39 
Questionmail body have to display in multiple lines Pin
myms.net15-Jun-09 2:07
myms.net15-Jun-09 2:07 
AnswerRe: mail body have to display in multiple lines Pin
Dave Kreskowiak15-Jun-09 3:57
mveDave Kreskowiak15-Jun-09 3:57 

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.