Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to move parent form pointer change size,son form cha
Message
From
10/05/2011 05:49:45
 
 
To
10/05/2011 05:06:37
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
VB 9.0
OS:
Windows XP
Database:
MS SQL Server
Miscellaneous
Thread ID:
01510136
Message ID:
01510137
Views:
42
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform