Click here to Skip to main content
16,004,479 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hello!

I have mdi parent form and mdichild form.
When maximize click in parent form,I want to effect(resiable) the datagridview in mdi childform.How could I do?
So, pls let me know.

Warmly Regards,
nwe nwe
Posted

You haven't told how much you want to resize. But if you have set DockStyle of datagridview to fill up the child form(i.e, if Datagridview.DockStyle= DockStyle.Fill), then it will be automatically resized when you maximize or resize the childform.

private void parentForm_resize(...)
{
Childform.size= Parentform.size;
}
 
Share this answer
 
v2
Hi,

There is a property for each control Anchor
Set the control's anchor property to All

And also change the property Dock to Fill
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900