/// <summary>
        /// Event generated on form closed
        /// </summary>
        /// <param name="sender">Object that has generated the event</param>
        /// <param name="e">Event arguments</param>
        private void Form_FormClosed(object sender, EventArgs e)
        {
            _result = _form.DialogResult;
            _form   = null;

            //Send notification to the server
            IAppClient appClient = new AppClient(ClientId);

            appClient.FormClosed();
        }
        /// <summary>
        /// Show internally the current window
        /// </summary>
        /// <param name="ownerForm">Owner window</param>
        /// <param name="asDialog">Check if show the window as a dialog</param>
        private void ShowInternal(NativeWindow ownerForm, bool asDialog)
        {
            _form             = new WebControlForm();
            _form.FormClosed += Form_FormClosed;

            //SetParent(_form.Handle, ownerForm.Handle);

            if (asDialog)
            {
                _form.ShowDialog(ownerForm);
            }
            else
            {
                _form.Show(ownerForm);
            }
        }