dcsimg
Results 1 to 8 of 8

Thread: MDI Child causes MDI Parent to disappear in Windows 7 64-bit

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2013
    Posts
    13

    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

  2. #2

  3. #3
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    3,507

    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)

  4. #4

    Thread Starter
    New Member
    Join Date
    Feb 2013
    Posts
    13

    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?

  5. #5

    Thread Starter
    New Member
    Join Date
    Feb 2013
    Posts
    13

    Re: MDI Child causes MDI Parent to disappear in Windows 7 64-bit

    Quote Originally Posted by Arnoutdv View Post
    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

  6. #6
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    32,380

    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
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  7. #7
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    32,380

    Re: MDI Child causes MDI Parent to disappear in Windows 7 64-bit

    Quote Originally Posted by p2706 View Post
    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 View Post
    no, there is no Form.hide, or .visble anywhere
    what does this do then?
    Call mSetVisible(False)

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  8. #8

    Thread Starter
    New Member
    Join Date
    Feb 2013
    Posts
    13

    Re: MDI Child causes MDI Parent to disappear in Windows 7 64-bit

    Quote Originally Posted by techgnome View Post
    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

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width