Is there a way for the PopupContainerControl to work without the parent control getting deactivated?
Our PopupControlContainer acts as a separate container and hence the main form loses its focus when controls inside Container receives focus.One way to overcome this is to display the PopupControlContainer using Show() method than using ShowPopup() method.
In ShowPopup method,when you specify a Parent Control using ParentControl property and pass a Point.Empty location , the popup location will be dynamically determined based on the ParentControls bounds and the screen area.Inorder to get the same behaviour while using Show() method,you need to determine the popup location manually as shown below.
point.Y=point.Y +this.popupControlContainer1.ParentControl.Height ;
Dim point As Point=Me.popupControlContainer1.ParentControl.Location
Also for closing the PopupControlContainer,you can check the visibility of the control in Form's Click Event.
private void Form1_Click(object sender, System.EventArgs e)
Private Sub Form1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Click
If Me.popupControlContainer1.Visible =True Then