Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MdiParent Property Question
Message
De
03/10/2008 11:42:54
 
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 9.0
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01352333
Message ID:
01352588
Vues:
15
I *think* I understand what it is you're asking, and if so, would this work:
private void barInventory_Click(object sender, System.EventArgs e)
{
	// Create an instance of the user list
	frmItemList oItemList = new frmItemList();
	
	// Make the user list a child of the desktop
	oItemList.MdiParent = this.MdiParent;  // <-- here's what I changed

	// Show the form
	oItemList.Show();
}
~~Bonnie





>I have a MDI Container form called Desktop, and when I open a form from the menu I set oForm.MdiParent = oDesktop, and the form stays inside the desktop. All is well.
>
>
>private void barInventory_Click(object sender, System.EventArgs e)
>{
>	// Create an instance of the user list
>	frmItemList oItemList = new frmItemList();
>	
>	// Make the user list a child of the desktop
>	oItemList.MdiParent = this;
>
>	// Show the form
>	oItemList.Show();
>}
>
>This works great.
>
>
>But when the Inventory List form opens the Inventory Item form, I'm not sure what to set its MdiParent to. The 'this' keyword inside the inventory list is a reference to that form, not the desktop.
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform