First of all, C# doesnt have functions, they are methods. I'm on a crusade to eradicate that word from this board ;)
Secondly, how is the method declared, private/public/protected? How have you created your reference to the parent form?
Ryshad
Nearly a Posting Virtuoso
1,307 posts since Aug 2009
Reputation Points: 512
Solved Threads: 246
Theres your problem. You arent getting a reference to your original Form1, you are creating a new one.
You need to get a reference to the original form if you want to effect any changes to it:
Form1 parent = (Form1)this.MdiParent;
parent.alllblvis();
You need to ensure you have set the MDIParent of the second form when you called it:
Form2 newForm = new Form2();
newForm.MdiParent = this;
newForm.Show();
Ryshad
Nearly a Posting Virtuoso
1,307 posts since Aug 2009
Reputation Points: 512
Solved Threads: 246