Form_Load Event

  • Thread starter Thread starter Ori
  • Start date Start date
O

Ori

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
 
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
 
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 said:
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
///
 
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
 
* "news.microsoft.com said:
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".
 
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 said:
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

event
states
 
jackass

Jerry Ham said:
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 said:
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?
 
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.
 
* "news.microsoft.com said:
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?
 
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.
 
* "news.microsoft.com said:
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.
 
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.
 
*wipes arrse with code*


news.microsoft.com said:
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.
 
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.
 
Back
Top