Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Netscape / Winamp / SAPrefs Style options dialog

Netscape / Winamp / SAPrefs Style options dialog

Scheduled Pinned Locked Moved C#
helpc++comdata-structuresquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dazinith
    wrote on last edited by
    #1

    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 the ShowForm() 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

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups