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