We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

MDI window has problems redrawing

I have a MDI form and a child window, and I am using the XPmenus (barmanager, baritems, etc.). Has anyone had the following problem: I open a modal form to make a selection that will appear in the MDI parent form. Once the selection is made the modal form closes but instead of the MDI parent form receiving focus any open application behind it gets the focus but the MDI parent remains at the top but with a hole down to the now active window where the modal form once was on the screen. The kicker is that this only occurs when the MDI child form is maximized in the parent. If it is minimized, or just within the parent this redraw/focus problem does not occur. Although there is a slight flicker of that blank-space, but it's not nearly as bad. Attached is a word doc in a zip file with two screen shots of what I'm encountering. Thanks, Tom

1 Reply

TL Tom Le Blanc December 24, 2002 03:47 PM UTC

I found a work-around on Google groups. It appears that it's a Microsoft problem (so I should have put this in the Windows Forms forum): "...delay the close using BeginInvoke. This essentially delays the call to Close until the current windows messages are done being processed. Private Sub ListBox1_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListBox1.DoubleClick BeginInvoke(New MethodInvoker(AddressOf Close)) End Sub ..." T

Live Chat Icon For mobile
Up arrow icon