Re: Command that detect the calling form

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Bob Butler (tiredofit_at_nospam.com)
Date: 06/07/04


Date: Sun, 6 Jun 2004 17:18:56 -0700


"Bob O`Bob" <filterbob@yahoogroups.com> wrote in message
news:40C373D2.72FC@yahoogroups.com
<cut>
> Something I seem to recall having done is to expose a method in such a
> commonly-called form, and get everybody to call that, rather than
> .Show In such a public form method, you have a lot more options
> available, like you can pretty much count on Screen.Activeform not
> having changed.

That's what I do... Form3 would have code like:

Private mfOwner As Form

Public Sub ShowForm(byval TheOwner As Form)
Set mfOwner = The Owner
Me.Show vbModal, TheOwner
Set mfOwner=Nothing
End Sub

The code in the other forms would use:
  Form3.ShowForm Me

-- 
Reply to the group so all can participate
VB.Net... just say "No"