Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Accessing Different Instances Of One Form
Message
De
09/05/2002 12:50:09
Jason Dalio
Northern Interior Regional Health Board
Prince George, Colombie Britannique, Canada
 
 
À
Tous
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Titre:
Accessing Different Instances Of One Form
Divers
Thread ID:
00654590
Message ID:
00654590
Vues:
63
I'm workign with multiple instances of a form for the first time and it's been going well till just now. I need to add nodes to a tree on a multiple instanced form from another modal form. When i try and add the node from the modal form it fires the Form_Load event of the form with the tree control. This was driving me nuts for awhile until i realized that I am not working with just the form itself but an instance of the form (I'm still guessing at this point but oh well). ow do I refernce a particular form if there are multiple instances?

e.g. Below, how would I make my debug statements each reference one of the 2 newly created instances if the cmdDisplayValues is located on another form?
Private Sub cmdAddForm_Click
Dim NewPatientForm1 As frmPatient
Dim NewPatientForm2 As frmPatient

   NewPatientForm1.Show
   NewPatientForm2.Show

End Sub

Private Sub cmdDisplayValues

   debug.print frmPatient.Text1.Text        'here I want NewPatientForm1
   debug.print frmPatient.Text1.Text        'here I want NewPatientForm2
   Stop

End Sub
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform