Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to move parent form pointer change size,son form cha
Message
De
10/05/2011 05:49:45
 
 
À
10/05/2011 05:06:37
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 9.0
OS:
Windows XP
Database:
MS SQL Server
Divers
Thread ID:
01510136
Message ID:
01510137
Vues:
43
>Hi all,
> I use mid form , i want to parent form move right top pointer change size, and click change big size and samll size,
>then the son form also change the size base on parent form , Anyone know how can i do,
>use what method, pass X, Y coordinate or not, thank you ?

Handle the SizeChanged event of the parent form?:
Public Partial Class MainForm
	Inherits Form
	Private ChildForm As Form

	Public Sub New()
		InitializeComponent()
		ChildForm = New ChildForm()
		ChildForm.MdiParent = Me
		ChildForm.Show()
		Me.SizeChanged += New EventHandler(AddressOf MainForm_SizeChanged)
	End Sub

	Private Sub MainForm_SizeChanged(sender As Object, e As EventArgs)
		Dim f As Form = DirectCast(sender, Form)
		ChildForm.Width = f.Width / 2
		ChildForm.Height = f.Height / 2
                                'Or whatever
	End Sub
End Class
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform