VB6 - Selecting a form within a form makes the parent form 'inactive'
Posted on 2009-04-13
Okay, lets say I have a form, and I add a child form to appear in it.. What I mean is:
In FormMain I have a button with:
frmChild.Show vbModeless, Me
And in frmChild, FormLoad is:
SetParent Me.hWnd, frmMain.hWnd
Me.Top = (Me.Height - frmMain.Height) - frmStart.Top + 4300
Me.Left = 2190
Basicly, a form gets loaded INSIDE frmMain. The issue is, when I alt tab and try to click the form when frmChild is active, it doesn't get pushed up, basicly it doesn't reconize that frmMain should be brought up when I click frmChild.. FOR EXAMPLE: I bring up frmMain, click the button to bring up frmChild.. I open up lets say notepad, so notepad is now active. I try to click frmMain in the background without using the taskbar, basicly by trying to click frmChild, and it DOES NOT become active again! Basicly frmChild is not seen as part of frmMain is what I am guessing.. Wierd behaviour...
As well, when I click frmChild that is inside the frmMain, frmMain goes 'inactive', basicly what I mean is the top bar becomes 'inactive', so it would become gray, or a light blue in Vista to indicate the form is not the active form. This is an issue because I want to have frmChild apart of frmMain, so frmMain should be active too!