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
D

dmccabe2

@dmccabe2
About
Posts
3
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How many...
    D dmccabe2

    10-15 a day! I'd spent my whole day in the bathroom! :-0 2-3 is enough for me.

    The Lounge question

  • MdiParent Question
    D dmccabe2

    Don't know if this is the best way but... In your MDI Main create a method which passes a temporary Form as a parameter then iterate through all open forms to return the index of the form: int formIndex = -1; int i = 0; foreach (Form cf in this.MDIChildren) { // compare the Form you passed with all open Forms if (passedForm.GetType() == cf.GetType()) { formIndex = i; } i++; } Replace the code in the if statement of the dialogresult to: ThirdForm tempForm = new ThirdForm(); int frmIndex = IndexOfForm(tempForm); tempForm.Dispose(); // The form is not open if(frmIndex == -1) { ThirdForm ThirdFormGUI = new ThirdForm(); ThirdFormGUI.MdiParent = this; ThirdFormGUI.Show(); } // The form is already open else { this.MdiChildren[frmIndex].BringToFront(); }

    C# help question

  • MdiParent Question
    D dmccabe2

    Is this what you're looking for? in MDI main form: private void menuItem1_Click(object sender, System.EventArgs e) { DialogForm aDialogFormGUI = new DialogForm(); if (aDialogFormGUI.ShowDialog()== DialogResult.OK) { ThirdForm aThirdFormGUI = new ThirdForm(); aThirdFormGUI.MdiParent = this; aThirdFormGUI.Show(); } } On the Dialog form in the Close event or Click; DialogResult = DialogResult.OK; Hope this helps.

    C# help question
  • Login

  • Don't have an account? Register

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