Back in the good old VBn days a form showed itself AFTER the Load event was
processed.

In .NET, however, the loaded form is displayed (including interim states of
it) DURING the processing of the Load event.

Is there a way to prevent this?

Thank you

Re: Form_Load Event by news

news
Sun Oct 26 16:02:19 CST 2003

So we need a .Loaded event to signal completion of a loaded form.

Just like we have closing and closed events.

you could always override WndProc and check WM_ message

"Ori" <ori.millo@fujitsu.com.au> wrote in message
news:Ogc6GuAnDHA.2512@TK2MSFTNGP09.phx.gbl...
> Back in the good old VBn days a form showed itself AFTER the Load event
was
> processed.
>
> In .NET, however, the loaded form is displayed (including interim states
of
> it) DURING the processing of the Load event.
>
> Is there a way to prevent this?
>
> Thank you
>
>



Re: Form_Load Event by news

news
Sun Oct 26 16:08:14 CST 2003

can you not check

if (this.Created == true )
{
}

or

on the _Load event to see if its finished loading

The Created property returns true if the Control was successfully created

or .Visible?


"Ori" <ori.millo@fujitsu.com.au> wrote in message
news:Ogc6GuAnDHA.2512@TK2MSFTNGP09.phx.gbl...
> Back in the good old VBn days a form showed itself AFTER the Load event
was
> processed.
>
> In .NET, however, the loaded form is displayed (including interim states
of
> it) DURING the processing of the Load event.
>
> Is there a way to prevent this?
>
> Thank you
>
>



Re: Form_Load Event by hirf-spam-me-here

hirf-spam-me-here
Sun Oct 26 16:45:06 CST 2003

* "Ori" <ori.millo@fujitsu.com.au> scripsit:
> Back in the good old VBn days a form showed itself AFTER the Load event was
> processed.
>
> In .NET, however, the loaded form is displayed (including interim states of
> it) DURING the processing of the Load event.

\\\
Private Sub Form1_Activated( _
ByVal sender As Object, _
ByVal e As System.EventArgs _
) Handles MyBase.Activated
Static p_blnActivated As Boolean
If Not p_blnActivated Then
p_blnActivated = True
MsgBox("Foo")
End If
End Sub
///

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

Re: Form_Load Event by news

news
Sun Oct 26 16:58:08 CST 2003

Occurs when the form is activated in code or by the user.

Bzzt. I guess I can just keep trigering that by activating that as a USER.

If ur gona post in the forums, try using proper .NET naming conventions and
not some jackass p_blahblah

"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
news:bnhiqc$10gbrs$2@ID-208219.news.uni-berlin.de...
> * "Ori" <ori.millo@fujitsu.com.au> scripsit:
> > Back in the good old VBn days a form showed itself AFTER the Load event
was
> > processed.
> >
> > In .NET, however, the loaded form is displayed (including interim states
of
> > it) DURING the processing of the Load event.
>
> \\\
> Private Sub Form1_Activated( _
> ByVal sender As Object, _
> ByVal e As System.EventArgs _
> ) Handles MyBase.Activated
> Static p_blnActivated As Boolean
> If Not p_blnActivated Then
> p_blnActivated = True
> MsgBox("Foo")
> End If
> End Sub
> ///
>
> --
> Herfried K. Wagner
> MVP · VB Classic, VB.NET
> <http://www.mvps.org/dotnet>



Re: Form_Load Event by hirf-spam-me-here

hirf-spam-me-here
Sun Oct 26 17:16:53 CST 2003

* "news.microsoft.com" <anonymouse@discussions.microsoft.com> scripsit:
> Occurs when the form is activated in code or by the user.

What's the problem with that?

> Bzzt. I guess I can just keep trigering that by activating that as a USER.

Did you test it?

> If ur gona post in the forums, try using proper .NET naming conventions and
> not some jackass p_blahblah

I am using proper conventions. The "p_" prefix stands for "persistent".

>>> In .NET, however, the loaded form is displayed (including interim states
>>> of it) DURING the processing of the Load event.
>>
>> \\\
>> Private Sub Form1_Activated( _
>> ByVal sender As Object, _
>> ByVal e As System.EventArgs _
>> ) Handles MyBase.Activated
>> Static p_blnActivated As Boolean
>> If Not p_blnActivated Then
>> p_blnActivated = True
>> MsgBox("Foo")
>> End If
>> End Sub
>> ///

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

Re: Form_Load Event by Jerry

Jerry
Sun Oct 26 19:19:11 CST 2003

If you are asking for help you probably should refrain from calling people
jackasses!

Otherwise we might be tempted to tell you to learn to spell...

"news.microsoft.com" <anonymouse@discussions.microsoft.com> wrote in message
news:u$JddQBnDHA.2676@TK2MSFTNGP11.phx.gbl...
> Occurs when the form is activated in code or by the user.
>
> Bzzt. I guess I can just keep trigering that by activating that as a USER.
>
> If ur gona post in the forums, try using proper .NET naming conventions
and
> not some jackass p_blahblah
>
> "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
> news:bnhiqc$10gbrs$2@ID-208219.news.uni-berlin.de...
> > * "Ori" <ori.millo@fujitsu.com.au> scripsit:
> > > Back in the good old VBn days a form showed itself AFTER the Load
event
> was
> > > processed.
> > >
> > > In .NET, however, the loaded form is displayed (including interim
states
> of
> > > it) DURING the processing of the Load event.
> >
> > \\\
> > Private Sub Form1_Activated( _
> > ByVal sender As Object, _
> > ByVal e As System.EventArgs _
> > ) Handles MyBase.Activated
> > Static p_blnActivated As Boolean
> > If Not p_blnActivated Then
> > p_blnActivated = True
> > MsgBox("Foo")
> > End If
> > End Sub
> > ///
> >
> > --
> > Herfried K. Wagner
> > MVP · VB Classic, VB.NET
> > <http://www.mvps.org/dotnet>
>
>



Re: Form_Load Event by news

news
Mon Oct 27 00:52:39 CST 2003

Where in MSDN guidelines does it state that.

That would equate to hungarian.

"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
news:bnhkuh$10v12g$2@ID-208219.news.uni-berlin.de...
> * "news.microsoft.com" <anonymouse@discussions.microsoft.com> scripsit:
> > Occurs when the form is activated in code or by the user.
>
> What's the problem with that?
>
> > Bzzt. I guess I can just keep trigering that by activating that as a
USER.
>
> Did you test it?
>
> > If ur gona post in the forums, try using proper .NET naming conventions
and
> > not some jackass p_blahblah
>
> I am using proper conventions. The "p_" prefix stands for "persistent".
>
> >>> In .NET, however, the loaded form is displayed (including interim
states
> >>> of it) DURING the processing of the Load event.
> >>
> >> \\\
> >> Private Sub Form1_Activated( _
> >> ByVal sender As Object, _
> >> ByVal e As System.EventArgs _
> >> ) Handles MyBase.Activated
> >> Static p_blnActivated As Boolean
> >> If Not p_blnActivated Then
> >> p_blnActivated = True
> >> MsgBox("Foo")
> >> End If
> >> End Sub
> >> ///
>
> --
> Herfried K. Wagner
> MVP · VB Classic, VB.NET
> <http://www.mvps.org/dotnet>



Re: Form_Load Event by news

news
Mon Oct 27 00:52:13 CST 2003

jackass

"Jerry Ham" <Jerry-Spam@cvx.net> wrote in message
news:OVz4UhCnDHA.2500@TK2MSFTNGP10.phx.gbl...
> If you are asking for help you probably should refrain from calling people
> jackasses!
>
> Otherwise we might be tempted to tell you to learn to spell...
>
> "news.microsoft.com" <anonymouse@discussions.microsoft.com> wrote in
message
> news:u$JddQBnDHA.2676@TK2MSFTNGP11.phx.gbl...
> > Occurs when the form is activated in code or by the user.
> >
> > Bzzt. I guess I can just keep trigering that by activating that as a
USER.
> >
> > If ur gona post in the forums, try using proper .NET naming conventions
> and
> > not some jackass p_blahblah
> >
> > "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
> > news:bnhiqc$10gbrs$2@ID-208219.news.uni-berlin.de...
> > > * "Ori" <ori.millo@fujitsu.com.au> scripsit:
> > > > Back in the good old VBn days a form showed itself AFTER the Load
> event
> > was
> > > > processed.
> > > >
> > > > In .NET, however, the loaded form is displayed (including interim
> states
> > of
> > > > it) DURING the processing of the Load event.
> > >
> > > \\\
> > > Private Sub Form1_Activated( _
> > > ByVal sender As Object, _
> > > ByVal e As System.EventArgs _
> > > ) Handles MyBase.Activated
> > > Static p_blnActivated As Boolean
> > > If Not p_blnActivated Then
> > > p_blnActivated = True
> > > MsgBox("Foo")
> > > End If
> > > End Sub
> > > ///
> > >
> > > --
> > > Herfried K. Wagner
> > > MVP · VB Classic, VB.NET
> > > <http://www.mvps.org/dotnet>
> >
> >
>
>



Re: Form_Load Event by hirf-spam-me-here

hirf-spam-me-here
Mon Oct 27 05:43:11 CST 2003

* "news.microsoft.com" <anonymouse@discussions.microsoft.com> scripsit:
> Where in MSDN guidelines does it state that.
>
> That would equate to hungarian.

Who has ever forbidden to use Hungarian notation or something similar?
You? Who gives you the right to do that?

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

Re: Form_Load Event by news

news
Mon Oct 27 06:06:48 CST 2003

Well, since its a PUBLIC .NET Forum and since its STANDARD .NET NAMING
CONVENTION it useful to use the STANDARD notation for a PUBLIC audience.
Not some quakamily format. Ok fine, Ill start writing my own code examples
in some obscure convention..

Its blooody common sense to use STANDARD notation for a widespread audience.
Guess yoou wernt at the common sense counter.

"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
news:bnj0cu$1169n9$3@ID-208219.news.uni-berlin.de...
> * "news.microsoft.com" <anonymouse@discussions.microsoft.com> scripsit:
> > Where in MSDN guidelines does it state that.
> >
> > That would equate to hungarian.
>
> Who has ever forbidden to use Hungarian notation or something similar?
> You? Who gives you the right to do that?
>
> --
> Herfried K. Wagner
> MVP · VB Classic, VB.NET
> <http://www.mvps.org/dotnet>



Re: Form_Load Event by hirf-spam-me-here

hirf-spam-me-here
Mon Oct 27 06:25:27 CST 2003

* "news.microsoft.com" <discussion@discussion.microsoft.com> scripsit:
> Well, since its a PUBLIC .NET Forum and since its STANDARD .NET NAMING
> CONVENTION

There is no standard on a naming convention. There are "guidelines" and
recommendations on the naming of things that are part of the interface
(name of the class, methods, properties).

> it useful to use the STANDARD notation for a PUBLIC audience.

It's useful for _you_. But it doesn't make sense for me. I use my
adapted convention which is superior.

> Not some quakamily format. Ok fine, Ill start writing my own code examples
> in some obscure convention..

Nobody will prevent you from doing that.

> Its blooody common sense to use STANDARD notation for a widespread
> audience.

Who defines that? You?

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

Re: Form_Load Event by news

news
Mon Oct 27 07:28:28 CST 2003

yes you are superior. since the rest of the .net world will use camelcase
and pascal case and the GUIDELINES.

Actually ECMA defines that, does it not in the NOTATION. SO YES ITS BLLOODY
STANDARD unless you know better than the ECMA specs.


"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
news:bnj2t1$11l95m$1@ID-208219.news.uni-berlin.de...
> * "news.microsoft.com" <discussion@discussion.microsoft.com> scripsit:
> > Well, since its a PUBLIC .NET Forum and since its STANDARD .NET NAMING
> > CONVENTION
>
> There is no standard on a naming convention. There are "guidelines" and
> recommendations on the naming of things that are part of the interface
> (name of the class, methods, properties).
>
> > it useful to use the STANDARD notation for a PUBLIC audience.
>
> It's useful for _you_. But it doesn't make sense for me. I use my
> adapted convention which is superior.
>
> > Not some quakamily format. Ok fine, Ill start writing my own code
examples
> > in some obscure convention..
>
> Nobody will prevent you from doing that.
>
> > Its blooody common sense to use STANDARD notation for a widespread
> > audience.
>
> Who defines that? You?
>
> --
> Herfried K. Wagner
> MVP · VB Classic, VB.NET
> <http://www.mvps.org/dotnet>



Re: Form_Load Event by hirf-spam-me-here

hirf-spam-me-here
Mon Oct 27 07:54:30 CST 2003

* "news.microsoft.com" <discussion@discussion.microsoft.com> scripsit:
> yes you are superior. since the rest of the .net world will use camelcase
> and pascal case and the GUIDELINES.

I won't use camel case.

> Actually ECMA defines that, does it not in the NOTATION.

Who cares what ECMA defines?

> SO YES ITS BLLOODY
> STANDARD unless you know better than the ECMA specs.

Nobody can forbid me to use my own convention, even not for loval
variables. VB.NET isn't standardized by ECMA.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

Re: Form_Load Event by news

news
Mon Oct 27 08:08:31 CST 2003

Well, since you are not talking to one of youre corp collegues, and we do
not adhear to YOURE naming guidelines, and more people than you think use
ECMA guidelines, and as this is a PUBLIC group and on an MS server, i
suggest you use it or youre code will just be wiped on my aarse at least.


"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
news:bnj865$10853d$1@ID-208219.news.uni-berlin.de...
> * "news.microsoft.com" <discussion@discussion.microsoft.com> scripsit:
> > yes you are superior. since the rest of the .net world will use
camelcase
> > and pascal case and the GUIDELINES.
>
> I won't use camel case.
>
> > Actually ECMA defines that, does it not in the NOTATION.
>
> Who cares what ECMA defines?
>
> > SO YES ITS BLLOODY
> > STANDARD unless you know better than the ECMA specs.
>
> Nobody can forbid me to use my own convention, even not for loval
> variables. VB.NET isn't standardized by ECMA.
>
> --
> Herfried K. Wagner
> MVP · VB Classic, VB.NET
> <http://www.mvps.org/dotnet>



Re: Form_Load Event by news

news
Mon Oct 27 08:09:42 CST 2003

*wipes arrse with code*


"news.microsoft.com" <discussion@discussion.microsoft.com> wrote in message
news:%23dZM7MJnDHA.688@TK2MSFTNGP10.phx.gbl...
> Well, since you are not talking to one of youre corp collegues, and we do
> not adhear to YOURE naming guidelines, and more people than you think use
> ECMA guidelines, and as this is a PUBLIC group and on an MS server, i
> suggest you use it or youre code will just be wiped on my aarse at least.
>
>
> "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
> news:bnj865$10853d$1@ID-208219.news.uni-berlin.de...
> > * "news.microsoft.com" <discussion@discussion.microsoft.com> scripsit:
> > > yes you are superior. since the rest of the .net world will use
> camelcase
> > > and pascal case and the GUIDELINES.
> >
> > I won't use camel case.
> >
> > > Actually ECMA defines that, does it not in the NOTATION.
> >
> > Who cares what ECMA defines?
> >
> > > SO YES ITS BLLOODY
> > > STANDARD unless you know better than the ECMA specs.
> >
> > Nobody can forbid me to use my own convention, even not for loval
> > variables. VB.NET isn't standardized by ECMA.
> >
> > --
> > Herfried K. Wagner
> > MVP · VB Classic, VB.NET
> > <http://www.mvps.org/dotnet>
>
>



Re: Form_Load Event by news

news
Mon Oct 27 08:12:41 CST 2003

I suggest you include a lexicon and key detailing youre code for every post
you make.



"news.microsoft.com" <discussion@discussion.microsoft.com> wrote in message
news:%23WnolNJnDHA.2364@TK2MSFTNGP11.phx.gbl...
> *wipes arrse with code*
>
>
> "news.microsoft.com" <discussion@discussion.microsoft.com> wrote in
message
> news:%23dZM7MJnDHA.688@TK2MSFTNGP10.phx.gbl...
> > Well, since you are not talking to one of youre corp collegues, and we
do
> > not adhear to YOURE naming guidelines, and more people than you think
use
> > ECMA guidelines, and as this is a PUBLIC group and on an MS server, i
> > suggest you use it or youre code will just be wiped on my aarse at
least.
> >
> >
> > "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
> > news:bnj865$10853d$1@ID-208219.news.uni-berlin.de...
> > > * "news.microsoft.com" <discussion@discussion.microsoft.com> scripsit:
> > > > yes you are superior. since the rest of the .net world will use
> > camelcase
> > > > and pascal case and the GUIDELINES.
> > >
> > > I won't use camel case.
> > >
> > > > Actually ECMA defines that, does it not in the NOTATION.
> > >
> > > Who cares what ECMA defines?
> > >
> > > > SO YES ITS BLLOODY
> > > > STANDARD unless you know better than the ECMA specs.
> > >
> > > Nobody can forbid me to use my own convention, even not for loval
> > > variables. VB.NET isn't standardized by ECMA.
> > >
> > > --
> > > Herfried K. Wagner
> > > MVP · VB Classic, VB.NET
> > > <http://www.mvps.org/dotnet>
> >
> >
>
>



Re: Form_Load Event by hirf-spam-me-here

hirf-spam-me-here
Mon Oct 27 08:48:23 CST 2003

* "news.microsoft.com" <discussion@discussion.microsoft.com> scripsit:
> I suggest you include a lexicon and key detailing youre code for every post
> you make.

*PLONK*

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

Re: Form_Load Event by Ori

Ori
Mon Oct 27 17:33:42 CST 2003

That wouldn't do because Activate event fires 1+ times for a form. I need a
once-off event to initialize stuff.

To clarify: the function works propertly but since the form is visible at
that stage there is a lot of flickering.

"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
news:bnhiqc$10gbrs$2@ID-208219.news.uni-berlin.de...
> * "Ori" <ori.millo@fujitsu.com.au> scripsit:
> > Back in the good old VBn days a form showed itself AFTER the Load event
was
> > processed.
> >
> > In .NET, however, the loaded form is displayed (including interim states
of
> > it) DURING the processing of the Load event.
>
> \\\
> Private Sub Form1_Activated( _
> ByVal sender As Object, _
> ByVal e As System.EventArgs _
> ) Handles MyBase.Activated
> Static p_blnActivated As Boolean
> If Not p_blnActivated Then
> p_blnActivated = True
> MsgBox("Foo")
> End If
> End Sub
> ///
>
> --
> Herfried K. Wagner
> MVP · VB Classic, VB.NET
> <http://www.mvps.org/dotnet>