-
June 2nd, 2005, 10:49 PM
#1
shared main
Hello,
I have tabcontrol over main form, and I am creating and adding child forms to it. I wish to remove the tab, when child form unloads. However in .net 2003,
frmMain.myTab...... like syntax isn't valid (OOP). I think I should make the mainForm as shared/global? How to do that? I'll appreciate any help.
-
June 3rd, 2005, 02:56 AM
#2
Re: shared main
I think I should make the mainForm as shared/global?
No - it will be enough if U make tab control as shared.
But better make shared method (in main form).
And even better if U create an event and subscribe to it from mainform.
U can also create a form which will be the base form of all your child forms. Than U can make all common coding here.
Best regards,
Krzemo.
-
June 3rd, 2005, 06:04 AM
#3
Re: shared main
When you guys say "shared", you mean either PUBLIC or FRIEND scope and not SHARED right?
Krzemo is right, the proper way is to expose either METHOD or EVENT to do what you want to do.
Good Luck,
-Cool Bizs
-
June 5th, 2005, 04:34 AM
#4
Re: shared main
Sorry for my lack of understanding of VB .net. I still could not work it out. By making TabCOntrol1 of main control 'public', it can be accessed from other forms, but I wish to access TabCOntrol1 of SAME INSTANCE of the main form, not creating it again and then accessing its controls.
Any code will be helpful. I know, it'll be very short . Just use of some right word at right place. [for example to solve this: I have a main form, over which I have a Tab control with two tab pages. How to delete second tab page from other form, Form2]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|