You can't do what you want if the datagrid is placed on the MDI parent. If you could, then you would not have any client area on the MDI to display any child forms. The MDI client area is subtracted from the space used by sited controls. And since you expect the grid to fill the client area, the available space for MDI child forms is zero.
Here's a suggestion:
1. Create a borderless form, as a MDI child. We'll call that form: frmDataGrid
2. Place your ADODC and Datagrid onto that child form. Set the Align property of the controls as needed
3. In the MDIForm_Load event, add this: frmDataGrid.Show
4. In the MDIForm_Resize event, add this
Code:
On Error Resume Next
With frmDataGrid
.Move 0, 0, Me.ScaleWidth, Me.ScaleHeight
End With
5. In the frmDataGrid form's Form_Resize event, add this
Code:
On Error Resume Next
With DataGrid1
.Move .Left, .Top, Me.ScaleWidth, Me.ScaleHeight - .Top
End With
What the above does is use a borderless MDI Child form that is initially loaded in the MDI parent. When the MDI parent resizes, it resizes the child form. When the child form resizes, it resizes the datagrid. Since the child is borderless, it can't easily be closed. And any subsequent child forms will not be placed behind frmDataGrid.
Insomnia is just a byproduct of, "It can't be done"
Do you want to auto-size the DataGrid columns to fill the width of the MDIForm width? If this is what you want, it still will not look nice because there are only 3 columns and they will look stretched. Maybe put them on the left instead. Picturebox align left and the adodc1 and DataGrid1 inside Picturebox. You size them to fit.