Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb_dotnet thread: Re: Equivalent of load form and activate event in vb7


Message #1 by oliver@o... on Wed, 27 Feb 2002 14:37:04
The equivelent of form load is something like:

Dim  NewForm as New frmMainApp


NewForm does not show itself until     NewForm.show


regarding the Form_activated and other form events, they are still there.
You need to write a handler.
The button_click handlers are an example of the pattern.  There is
intellihelp for the events:

Sub Form_Event_handler (ByVal eventSender As System.Object, ByVal eventArgs
As System.EventArgs)  _
      Handles cmdCancel.Click

End Sub

The rub now is that unlike C#, there is not intelli help for the signature
of he handler.  The most common arguments for the event handlers are the
ones used by the button.click handler above.  But not all events handlers
use that signature.  The code will not compile if the signature is bad.
Then you need to lookup the particular event and see what the signature is.
There is reward in this complexity -- a MANY MORE events are available.  To
learn more read about DELEGATES.

Good luck.




----- Original Message -----
From: <oliver@o...>
To: "pro_VB_dotnet" <pro_vb_dotnet@p...>
Sent: Wednesday, February 27, 2002 6:37 AM
Subject: [pro_vb_dotnet] Re: Equivalent of load form and activate event in
vb7


>
> Dim FormX as new frmMainApp
> FormX.Show
>
> FormX.Activate
>
>
> > Hi guys
> >
> > what is the equivalent of:
> >
> > vb6
> >
> > load frmMainApp
> >
> > vb7 is ?
> >
> > ===
> >
> > how do you get the activated event in vb7 in vb6 we used to have it
> >
> > I have a mdi app and I want to could a form when gets activated.
> >
> > can anybody help?
> >
> > Thanks
> > Gabriel
> >
> >
>
$subst('Email.Unsub').


  Return to Index