Re: Is this safe
Tech-Archive recommends: Speed Up your PC by fixing your registry
Michael Chambers wrote:
Thanks for the feedback. I'm the one who's authoring this form however and
the constructor will always perform simple initialization only (no window
handles are ever created). Since the form is originally created by the VS
form's designer however, I can't be sure what "InitializeComponent()" will
do. I seriously doubt that it ever deals with windows handles however (this
is a constructer after all) but you never know. Hopefully someone can
clarify the situation. Anyway, thanks again.
Michael,
I have seen evidence in the past that something in the
InitializeComponent method was pumping messages. If that's true then
it's not out of the realm of possibility that a Form's thread affinity
is defined within its constructor. In reality I bet that's delayed
until Show or ShowDialog is called, but you never know.
Brian
.
Relevant Pages
- Re: Message Builder vs. a Build Method?
... Builder class would encapsulate all the complex algorithms for making ... OTOH, as Daniel T. suggests, sometimes the initialization requires unique processing for initialization that is clearly intrinsic to the object itself. ... Constructors tend to be fragile and it is difficult to manage errors when they occur in a constructor scope, so it is usually a good idea to keep the processing in constructors as simple as possible. ... When the initialization of attribute data requires complex processing AND it seems like is intrinsic ot the object, that justifies having a separate initialization method that is invoked immediately after the constructor. ... (comp.object) - Re: Localization Service
... these assets are contents to be edited by the users. ... problem with a validatorFactory. ... I was filling the dictionary on the constructor. ... beware of too much deferred initialization. ... (microsoft.public.dotnet.languages.csharp) - Re: CSplitterWnd object not valid
... >>> splitter window not being fully constructed yet. ... > tree and calls insertwhich is a member function of my frame window ... MainWindow() was null when MainWindow::insertwas called. ... that I was calling CFrameWnd::Createin the constructor of MainWindow. ... (microsoft.public.vc.mfc) - Re: Constructor as a "Reset" Button
... constructor is more or less just for initialization, ... In PHP you might get ... And HIPPA certification is not easy - nor is it cheap. ... (comp.lang.php) - Re: Initialize an array of classes?
... Currently you cannot use member initialization list for a nonstatic array of a class if it does not have a default constructor. ... however you may encounter the warning C4351 and I do not think that it is useful to use such initialization for an array. ... Microsoft Online Community Support ... (microsoft.public.dotnet.languages.vc) |
|