Netscape / Winamp / SAPrefs Style options dialog
-
hi everyone.. im working on a dialog that is very similar to this article written in C++ http://www.codeproject.com/property/saprefs.asp?target=saprefs[^] i actually have the whole thing working except one small minor glitch that i cant figure out.. i will be posting an article and provide the dialog as freeware, but i need to fix this glitch first.. basicly when you click on the tree on the left i call this function:
private void tvOptionsTree_AfterSelect(object sender, System.Windows.Forms.TreeViewEventArgs e)
{
Form frmSelected = GetSelectedForm();
if (frmSelected == null)
{ MessageBox.Show("An error has occured in the options form which should never occur!\r\ntvOptionsTree_AfterSelect()");
return; }ShowForm(frmSelected);
}
which in turn calls this:
private void ShowForm(Form frmForm)
{
this.SuspendLayout();// if there is a form currently displayed we must get rid of it if (this.m\_frmShownForm != null) { this.m\_frmShownForm.Enabled = false; this.m\_frmShownForm.Visible = false; this.RemoveOwnedForm(m\_frmShownForm);} m\_frmShownForm = frmForm; m\_frmShownForm.Location = new Point(this.PointToScreen(new Point(0, 0)).X + panel1.Left, this.PointToScreen(new Point(0, 0)).Y + panel1.Top); m\_frmShownForm.Size = panel1.Size; m\_frmShownForm.FormBorderStyle = FormBorderStyle.None; m\_frmShownForm.ShowInTaskbar = false; m\_frmShownForm.StartPosition = FormStartPosition.Manual; this.AddOwnedForm(m\_frmShownForm); //this.ResumeLayout(); m\_frmShownForm.Enabled = true; m\_frmShownForm.Visible = true; m\_frmShownForm.BringToFront(); m\_frmShownForm.Select(); m\_frmShownForm.Focus(); m\_frmShownForm.Refresh();
}
as you can see i put the new form to the front, set it as the focus, enable it, make it visible.. almost everything i can think of.. and it works great.. but.. when the form loads it calls the form load event which in turn calls the
tvOptionsTree_AfterSelect
function as listed above.. which in turn calls theShowForm()
as listed above.. but i cant click in any of the fields on the dialog on the right hand side which it displayed.. i cant click in a checkbox, i dont get an 'i-beam' when i put the cursor over the textboxes, etc.. as soon as i choose another item in the tree it works.. go back to the starting page and i