MDI Child causes MDI Parent to disappear in Windows 7 64-bit
I am testing a VB6 application for compatibility as we move to Windows 7 64-bit desktops in 2014.
I have noticed something that is very strange and can't work out why it's happening.
When I open certain child forms in my MDI interface, the application MDI window disapperas, and is also not in the Task List in Task Manager. The child form that I opened is fine, I can interact with, use global ADO connection variables and settings variables that are in the scope of the MDI parent, and I can do db changes.
When I close the child form, there is no MDI parent/ application windiow, and I have to clsoe the process using Task Manager.
Here is the code used to open the child form (from a menu in the MDI parent):
Code:
Private Sub mnuHermesDataInputProvisions_Click()
Me.MousePointer = vbHourglass
Load frmInputProvisions
frmInputProvisions.Show vbModal
Me.MousePointer = vbDefault
End Sub
Here is the form load event handler in the child form:
Code:
Private Sub Form_Load()
With Me.DTPdataDate
.Format = dtpCustom
.CustomFormat = "dd MMM yyy" 'DTPICKER_DATE_FORMAT '"dd MMM yyy"
End With
Me.Top = frmMain.Top + (frmMain.Height - frmMain.ScaleHeight)
Call mSetMaxLength
Call mRefreshDataRecordset
Call mSetVisible(False)
Call mSetLocked(True)
Call mFormatStatusBar
Call mConstructListView
Call mPopulateListView
Call mSetTxtBoxValues
Call mSetEnabled(True)
mliNewIndex = 0
mbAddNew = False
mbAscendingSort = False
frmMain.MousePointer = vbDefault
End Sub
Has anyone seen anything similar happening with VB6 MDI applications under Win 7 64 bit?
Any thoughts on what I can do to prevent this - is there any documentation from Microsoft about this?
thanks
Philip
Re: MDI Child causes MDI Parent to disappear in Windows 7 64-bit
Is there any code on child form Unload/QueryUnload events?
Re: MDI Child causes MDI Parent to disappear in Windows 7 64-bit
Maybe anything in these calls which hides the MDI form?:
Code:
Call mSetMaxLength
Call mRefreshDataRecordset
Call mSetVisible(False)
Call mSetLocked(True)
Call mFormatStatusBar
Call mConstructListView
Call mPopulateListView
Call mSetTxtBoxValues
Call mSetEnabled(True)
Re: MDI Child causes MDI Parent to disappear in Windows 7 64-bit
no only in the Form_Load event, and the code in there is basically retrieving data and populating controls...
I get the same issue on other forms when data is being retrieved.
Could it be a memory leak caused by too big a dataset?
Re: MDI Child causes MDI Parent to disappear in Windows 7 64-bit
Quote:
Originally Posted by
Arnoutdv
Maybe anything in these calls which hides the MDI form?:
Code:
Call mSetMaxLength
Call mRefreshDataRecordset
Call mSetVisible(False)
Call mSetLocked(True)
Call mFormatStatusBar
Call mConstructListView
Call mPopulateListView
Call mSetTxtBoxValues
Call mSetEnabled(True)
no, there is no Form.hide, or .visble anywhere
Re: MDI Child causes MDI Parent to disappear in Windows 7 64-bit
hmmmm.... well, it's not a true child form... it's actually a dialog screen... you never set the MDIParent or identify it as a child. Is there anything in the lostfocus or deactivate even in the main MDI form? Also the form wouldn't be listed in the TaskManager... the Application should be, but the form won't.
Something you may want to try (it's probably what I'd do) is comment out all of the code in the Form_Load event... see if it still happens... if that fixes things, then start to uncomment the code one line at a time, until it breaks again... what ever code you activated at that point is likely the culprit... and should be explored further.
-tg
Re: MDI Child causes MDI Parent to disappear in Windows 7 64-bit
Quote:
Originally Posted by
p2706
no only in the Form_Load event, and the code in there is basically retrieving data and populating controls...
I get the same issue on other forms when data is being retrieved.
Could it be a memory leak caused by too big a dataset?
Hardly... it's something procedural.
Quote:
Originally Posted by
p2706
no, there is no Form.hide, or .visble anywhere
what does this do then?
Call mSetVisible(False)
-tg
Re: MDI Child causes MDI Parent to disappear in Windows 7 64-bit
Quote:
Originally Posted by
techgnome
Hardly... it's something procedural.
what does this do then?
Call mSetVisible(False)
-tg
it hides some controls that are not needed until the user has set some settings