Trouble in MDI Application
Hi all,
I'm trying to use MDI application for a multi-form program.
The problem is whe I use a txtTextBox_DoubleClick() in childform to display a datagrid which is has a list of item for selection. After the generate the set of data. All the data are supposed to display in the existing childform.
I found that the result is not what I expected. The data would display in form with same layout of childform instead of displaying in ActiveMdiChild.
Please help!!!
[506 byte] By [
Aqua] at [2007-11-18 19:27:38]

# 1 Re: Trouble in MDI Application
A bit hard to accurately determine the problem without seeing the code.
Sounds to me as though you might be re-initialising a new instance of the child form when you fill the grid.
So (if your child form is called frmChild) rather than having (code very vague):
Private Sub btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn.Click
Me.DataGrid1.DataSource = someDataSource
End Sub
You have:
Private Sub btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn.Click
Dim frm as New frmChild
frm.DataGrid1.DataSource = someDataSource
End Sub
Which would be creating a new form every time you click the button.
But seeing the code would make it much easier to give more accurate help.
Nathan.