-
Re: Rumors for beta 2
I agree with you . . . Perhaps OnAfterShow
Jacob
"Craig Powers" <enigma@hal-pc.org> wrote in message
news:3AB9174A.CF3514B2@hal-pc.org...
> "Sam Spencer [msft]" wrote:
> >
> > On the contrary there is a subtle difference between New and when the
> > form_load is called. New is called when an instance of the form is
created.
> > The form_load event is fired when the form is actually shown. For code
that
> > creates and shows the form immediatly afterwards, it has little new
benefit,
> > but for code that does not, it is really useful to have the form_load
event.
>
> I'm not sure form_load is the best name for it. Isn't the pre-.net
> form_load more like the .net "New" than the .net "form_load"?
>
> I'm not arguing against the feature, just suggesting that there might
> be a better name for it that conveys the meaning without giving false
> impressions about similarities to functionality in previous versions.
-
Re: Rumors for beta 2
Craig,
>Isn't the pre-.net form_load more like the .net "New" than the .net "form_load"?
No, the constructor (New) only runs once, when the instance is
created. Similar to the Initialize event in VB6.
VB6's Load, on the other hand, runs every time a Form is loaded, which
can occur more than once.
Matt
====================================
Mattias Sjögren - mattias @ mvps.org
-
Re: Rumors for beta 2
"Mattias Sjögren" <mattias.dont.want.spam@mvps.org> wrote in message
news:3ab935fa.265518835@news.devx.com...
> Craig,
>
> >Isn't the pre-.net form_load more like the .net "New" than the .net
"form_load"?
>
> No, the constructor (New) only runs once, when the instance is
> created. Similar to the Initialize event in VB6.
>
> VB6's Load, on the other hand, runs every time a Form is loaded, which
> can occur more than once.
Is the .Net Form_Load behavior public yet? My assumption is that it's
simply called immediately after the constructor runs and if that is not the
case then I'm curious what triggers it.
-
Re: Rumors for beta 2
On Tue, 20 Mar 2001 14:09:12 -0800, "Bob Butler"
<butlerbob@earthlink.net> wrote:
>That depends.... are they adding Form_Unload and the ability to Unload a
>form and later Load it again and have the controls reset to the design-time
>values while module-level variables are retained? Given that the WinForm
>model doesn't have the same class/gui split that VB forms did it seems
>doubtful and simply adding a Form_Load event is pretty meaningless.
They are doing it so that they can then say they are 'always listening
to suggestions for improvement' or some such bs. What about
QueryUnload, which I use a fair bit?
MM
-
Re: Rumors for beta 2
That part is already taken care of in Beta1.
It's just called Closing instead of QueryUnload.
-Rob
kylix_is@hotmail.com (Mike Mitchell) wrote:
>On Tue, 20 Mar 2001 14:09:12 -0800, "Bob Butler"
><butlerbob@earthlink.net> wrote:
>
>They are doing it so that they can then say they are 'always listening
>to suggestions for improvement' or some such bs. What about
>QueryUnload, which I use a fair bit?
>
>MM
-
Re: Rumors for beta 2
Closing is NOT a replacement for QueryUnload. It does not tell you why it is
closing.
--
Jonathan Allen
"Rob Teixeira" <RobTeixeira@@msn.com> wrote in message
news:3ab96487$1@news.devx.com...
>
> That part is already taken care of in Beta1.
> It's just called Closing instead of QueryUnload.
>
> -Rob
>
> kylix_is@hotmail.com (Mike Mitchell) wrote:
> >On Tue, 20 Mar 2001 14:09:12 -0800, "Bob Butler"
> ><butlerbob@earthlink.net> wrote:
> >
> >They are doing it so that they can then say they are 'always listening
> >to suggestions for improvement' or some such bs. What about
> >QueryUnload, which I use a fair bit?
> >
> >MM
>
-
Re: Rumors for beta 2
True enough I suppose.
Though I must admit I haven't used QueryUnload in years. 
I'm not saying it's not useful, but it somehow never seemed natural for the
way I built my apps.
-Rob
"Jonathan Allen" <greywolf@cts.com> wrote:
>Closing is NOT a replacement for QueryUnload. It does not tell you why it
is
>closing.
>
>--
>Jonathan Allen
>
>
>"Rob Teixeira" <RobTeixeira@@msn.com> wrote in message
>news:3ab96487$1@news.devx.com...
>>
>> That part is already taken care of in Beta1.
>> It's just called Closing instead of QueryUnload.
>>
>> -Rob
>>
>> kylix_is@hotmail.com (Mike Mitchell) wrote:
>> >On Tue, 20 Mar 2001 14:09:12 -0800, "Bob Butler"
>> ><butlerbob@earthlink.net> wrote:
>> >
>> >They are doing it so that they can then say they are 'always listening
>> >to suggestions for improvement' or some such bs. What about
>> >QueryUnload, which I use a fair bit?
>> >
>> >MM
>>
>
>
-
Re: Rumors for beta 2
"Jonathan Allen" <greywolf@cts.com> wrote in message <news:3ab96cbf@news.devx.com>...
> Closing is NOT a replacement for QueryUnload. It does not tell you why it is
> closing.
So how do you tell whether the form's closing because of direct user
action, in which case a "save file?" dialog might be appropriate, or
because the UPS is running out of battery power and the system needs
to shut down ASAP?
--
Joe Foster <mailto:jfoster@ricochet.net> Space Cooties! <http://www.xenu.net/>
WARNING: I cannot be held responsible for the above They're coming to
because my cats have apparently learned to type. take me away, ha ha!
-
Re: Rumors for beta 2
It is vital in the apps I build. I need to know if the window is being
closed by a parent MDI Form or by the form itself. Otherwise, I don't know
which dialog to show.
I also offer a warning dialog when the control box is used to close the
form. Some novices don't realize that is the same thing as hitting cancel.
--
Jonathan Allen
"Rob Teixeira" <RobTeixeira@@msn.com> wrote in message
news:3ab97c8f$1@news.devx.com...
>
> True enough I suppose.
> Though I must admit I haven't used QueryUnload in years. 
> I'm not saying it's not useful, but it somehow never seemed natural for
the
> way I built my apps.
>
> -Rob
>
> "Jonathan Allen" <greywolf@cts.com> wrote:
> >Closing is NOT a replacement for QueryUnload. It does not tell you why it
> is
> >closing.
> >
> >--
> >Jonathan Allen
> >
> >
> >"Rob Teixeira" <RobTeixeira@@msn.com> wrote in message
> >news:3ab96487$1@news.devx.com...
> >>
> >> That part is already taken care of in Beta1.
> >> It's just called Closing instead of QueryUnload.
> >>
> >> -Rob
> >>
> >> kylix_is@hotmail.com (Mike Mitchell) wrote:
> >> >On Tue, 20 Mar 2001 14:09:12 -0800, "Bob Butler"
> >> ><butlerbob@earthlink.net> wrote:
> >> >
> >> >They are doing it so that they can then say they are 'always listening
> >> >to suggestions for improvement' or some such bs. What about
> >> >QueryUnload, which I use a fair bit?
> >> >
> >> >MM
> >>
> >
> >
>
-
Re: Rumors for beta 2
> So how do you tell whether the form's closing because of direct user
> action, in which case a "save file?" dialog might be appropriate, or
> because the UPS is running out of battery power and the system needs
> to shut down ASAP?
I don't know, and I am certainly not happy about it.
--
Jonathan Allen
"Joe "Nuke Me Xemu" Foster" <joe@bftsi0.UUCP> wrote in message
news:3ab988b5@news.devx.com...
> "Jonathan Allen" <greywolf@cts.com> wrote in message
<news:3ab96cbf@news.devx.com>...
>
> > Closing is NOT a replacement for QueryUnload. It does not tell you why
it is
> > closing.
>
> So how do you tell whether the form's closing because of direct user
> action, in which case a "save file?" dialog might be appropriate, or
> because the UPS is running out of battery power and the system needs
> to shut down ASAP?
>
> --
> Joe Foster <mailto:jfoster@ricochet.net> Space Cooties!
<http://www.xenu.net/>
> WARNING: I cannot be held responsible for the above They're
coming to
> because my cats have apparently learned to type. take me away,
ha ha!
>
>
-
Re: Rumors for beta 2
Now see, that's a *legatimate* concern. All this about nonsense about adding
Tag and GoSub is/would be a waste of Microsoft's time, as I pointed out to
you yesterday.
/Pat
"Jonathan Allen" <greywolf@cts.com> wrote:
>It is vital in the apps I build. I need to know if the window is being
>closed by a parent MDI Form or by the form itself. Otherwise, I don't know
>which dialog to show.
>
>I also offer a warning dialog when the control box is used to close the
>form. Some novices don't realize that is the same thing as hitting cancel.
>
>--
>Jonathan Allen
>
>
>"Rob Teixeira" <RobTeixeira@@msn.com> wrote in message
>news:3ab97c8f$1@news.devx.com...
>>
>> True enough I suppose.
>> Though I must admit I haven't used QueryUnload in years. 
>> I'm not saying it's not useful, but it somehow never seemed natural for
>the
>> way I built my apps.
>>
>> -Rob
>>
>> "Jonathan Allen" <greywolf@cts.com> wrote:
>> >Closing is NOT a replacement for QueryUnload. It does not tell you why
it
>> is
>> >closing.
-
Re: Rumors for beta 2
Bob Butler wrote:
>
> "Mattias Sjögren" <mattias.dont.want.spam@mvps.org> wrote in message
> news:3ab935fa.265518835@news.devx.com...
> >
> > Craig Powers wrote:
> >
> > >Isn't the pre-.net form_load more like the .net "New" than the .net
> > >"form_load"?
> >
> > No, the constructor (New) only runs once, when the instance is
> > created. Similar to the Initialize event in VB6.
> >
> > VB6's Load, on the other hand, runs every time a Form is loaded, which
> > can occur more than once.
Yes, but this is still before the form is displayed. VB6 doesn't
really have anything corresponding to the .Net Form_Load, AFAIK.
As I use forms in VB6, there's little practical difference between
creating a form instance (.Net New) and loading it (VB6 Form_Load).
My understanding of forms in VB6 (which could be mistaken) is that
a form instance behaves rather like an object dim'ed As New, where
any reference to one that hasn't been loaded loads it immediately.
> Is the .Net Form_Load behavior public yet? My assumption is that it's
> simply called immediately after the constructor runs and if that is not the
> case then I'm curious what triggers it.
To quote the post from Sam Spencer of Microsoft, to which I was
replying:
> On the contrary there is a subtle difference between New and when the
> form_load is called. New is called when an instance of the form is
> created. The form_load event is fired when the form is actually shown.
-
Re: Rumors for beta 2
An alternative solution to a Form_Load event in .Net (I think) would be a
boolean property Form.IsShown. This would be true, whenever the form is
visible on the screen and false otherwise. Then, the programmer could use
the OnPropertyChanged Event and test for the string "IsShown." Furthermore,
if the programmer has code that they only want executed if the form is on
the screen, it can be encased in an if..then..else block rather than having
to place it in an event.
I have been adding this property to my forms and setting it in the
OnHandleCreated (or OnCreateHandle, can't remember the syntax right now)
event. It has worked out relatively well for me.
Just some thoughts. .
Jacob
-
Re: Rumors for beta 2
"Craig Powers" <enigma@hal-pc.org> wrote in message
news:3ABA1A48.4D27FD0D@hal-pc.org...
<cut>
> To quote the post from Sam Spencer of Microsoft, to which I was
> replying:
> > On the contrary there is a subtle difference between New and when the
> > form_load is called. New is called when an instance of the form is
> > created. The form_load event is fired when the form is actually shown.
So if you hide and the show the form is Form_Load called again? Sounds more
like Form_Activate to me...
-
Re: Rumors for beta 2
> An alternative solution to a Form_Load event in .Net (I think)
> would be a boolean property Form.IsShown. This would be True
> whenever the form is visible on the screen and false otherwise.
Jacob: How is this different from the .Visible property in VB6? Is the
..Visible property gone in VB.NET?
---
Phil Weber
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks