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. Making a form modeless?

Making a form modeless?

Scheduled Pinned Locked Moved C#
question
6 Posts 2 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.
  • V Offline
    V Offline
    vlusardi
    wrote on last edited by
    #1

    Don't see a form property that will allow me to leave a form open while accessing the parent form... how is this functionality achieved...??? thanks, vince

    I 1 Reply Last reply
    0
    • V vlusardi

      Don't see a form property that will allow me to leave a form open while accessing the parent form... how is this functionality achieved...??? thanks, vince

      I Offline
      I Offline
      Ista
      wrote on last edited by
      #2

      Form1 fm = new Form1(); fm.Show(); modal is fm.ShowDialog(); I'm not an expert yet, but I play one at work. Yeah and here too.

      V 1 Reply Last reply
      0
      • I Ista

        Form1 fm = new Form1(); fm.Show(); modal is fm.ShowDialog(); I'm not an expert yet, but I play one at work. Yeah and here too.

        V Offline
        V Offline
        vlusardi
        wrote on last edited by
        #3

        thanks for the reply... I tried using Form.Show()and it had no effect, still couldn't access the parent form without closing the child dialog... any other ideas...??? There's nothing special about the app, can't understand why it won't let me shift focus to the parent.... thanks for any more help, vince

        I 1 Reply Last reply
        0
        • V vlusardi

          thanks for the reply... I tried using Form.Show()and it had no effect, still couldn't access the parent form without closing the child dialog... any other ideas...??? There's nothing special about the app, can't understand why it won't let me shift focus to the parent.... thanks for any more help, vince

          I Offline
          I Offline
          Ista
          wrote on last edited by
          #4

          something like this public class FormChild { private Form objParent; public Form Parent { get { return objParent; } set { objParent=value; } FormChild_Load(object sender, EventArgs e ) { MessageBox.Show(objParent.Name); } } public Class ParentForm { ... Main FormChild child = new FormChild(); child.Parent = this; child.Show(); } That should work, I might mistype though but you have to supply a cycle reference I'm not an expert yet, but I play one at work. Yeah and here too.

          V I 2 Replies Last reply
          0
          • I Ista

            something like this public class FormChild { private Form objParent; public Form Parent { get { return objParent; } set { objParent=value; } FormChild_Load(object sender, EventArgs e ) { MessageBox.Show(objParent.Name); } } public Class ParentForm { ... Main FormChild child = new FormChild(); child.Parent = this; child.Show(); } That should work, I might mistype though but you have to supply a cycle reference I'm not an expert yet, but I play one at work. Yeah and here too.

            V Offline
            V Offline
            vlusardi
            wrote on last edited by
            #5

            Thanks a again for the help.... That's basically how I've coded my main and child form, but still no luck... As I said before, there's nothing special about either of the forms, main is a treeview/listview pair with a "settings" button that launches a child form... child form contains various controls (textboxes, buttons, monthcalendar control, status bar), and the only custom constructor (if you can call it that) accepts a string that is used to initialize a textbox... Thanks for any other suggestions... vince

            1 Reply Last reply
            0
            • I Ista

              something like this public class FormChild { private Form objParent; public Form Parent { get { return objParent; } set { objParent=value; } FormChild_Load(object sender, EventArgs e ) { MessageBox.Show(objParent.Name); } } public Class ParentForm { ... Main FormChild child = new FormChild(); child.Parent = this; child.Show(); } That should work, I might mistype though but you have to supply a cycle reference I'm not an expert yet, but I play one at work. Yeah and here too.

              I Offline
              I Offline
              Ista
              wrote on last edited by
              #6

              Well that method works, you could even pass in a reference to this in the constructor and set it that way in the child form. But if you set it it will be able to cycle back. If you have an email I can make a quick demo project I'm not an expert yet, but I play one at work. Yeah and here too.

              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