load sub

dunno
10-05-2001, 07:33 AM
HI,

I want to know, how do you load another form...example:
create a command button on form1, that when clicked, loads form 2...

thanks,

Banjo
10-05-2001, 07:36 AM
Load formName ' This just loads it into memory

FormName.Show ' This loads it and shows it in one go.

Volte
10-05-2001, 07:31 PM
actually I think that FormName.show will automatically Load formname. If you want FormName_Load to fire, even if the form is already shown\in memory, you need load FormName.

Thinker
10-05-2001, 08:08 PM
The Show method does indeed load the form before hand, but it does
not make the load method obsolete. If one needed to change some
options in the form between the time it loads and is displayed, one would
load first, set the properties, then show.

Since Volteface has edited his original post to remove the statement that
the load method is obsolete, I now will point out that the load event only
fires one time in the loaded life of a form. Only if the form is unloaded,
will the load method cause the load event to fire again.

I think therefore I am... sometimes right. images/icons/wink.gif<P ID="edit"><FONT class="small"><EM>Edited by Thinker on 10/05/01 09:13 PM.</EM></FONT></P>

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum