|
-
May 28th, 2009, 12:38 PM
#1
Thread Starter
Lively Member
muliple form in one main form ...
i have a main form and in its main menu i have edited 5 more other forms, when i am opening one form i can see it but the problem is i cant acess to my main menu to open other forms, how can i open multiple forms from one menu keeping each other active.
for eg: my main form is A, and five other forms are B,C, D, E, F.
SO to open form B from a ther is no problem, bt when B is active i cant acess to A,C,D,E,F...so i wnt a code with which i can use it, and keep active all the forms and can be able to acess any one .
any code will be much appreciated.
this is how i have used the technique to work.....
Code:
B.show ' to open form B
C.show 'to open C...similarly others from main menu A
-
May 28th, 2009, 12:52 PM
#2
Re: muliple form in one main form ...
The only way I could see you wouldn't be able to use form A is if you were using vbModal when calling the other forms
I'm guessing you are using this syntax
If you drop vbModal you should have access to the other visible forms in your projects.
-
May 28th, 2009, 01:31 PM
#3
Re: muliple form in one main form ...
Perhaps you should consider porting this app over to an MDI project.
-
May 28th, 2009, 02:44 PM
#4
Re: muliple form in one main form ...
hadi
What do you mean by "I can't access A C D E F"?
Are those other forms visually obstructed because form B covers them?
Or is it some other issue?
Spoo
-
May 28th, 2009, 03:03 PM
#5
Thread Starter
Lively Member
Re: muliple form in one main form ...
well i mean that when i open a form B from from the main form i cant use my main menu to open the other forms , i need to close the form B then and only then i can use to open other forms like C or D or E or F .
and i also tried vbmodal that is what i am using but it is still the same problem.
-
May 28th, 2009, 03:21 PM
#6
Lively Member
Re: muliple form in one main form ...
can you show us some code?
-
May 28th, 2009, 03:42 PM
#7
Thread Starter
Lively Member
Re: muliple form in one main form ...
Code:
Private Sub mnusmallperloss_Click()
SMALL.Show vbModal
End Sub
Code:
Private Sub mnusmper_Click()
SMPER.Show vbModal
End Sub
Code:
Private Sub mnuloss_Click()
TLOSS.Show vbModal
End Sub
Private Sub mnulper_Click()
LPER.Show vbModal
End Sub
Private Sub mnunoisep_Click()
NOISEP.Show vbModal
End Sub
-
May 28th, 2009, 03:44 PM
#8
Lively Member
Re: muliple form in one main form ...
ok....I'm to tired now to concentrate but i guess someone olready told you earlier not to user vbmodal.....Vbmodal exactly that does..it loads a new form on top af the old one without letting the user the posibility to acces the old one....
So, do not use vbmodal
-
May 28th, 2009, 04:15 PM
#9
Re: muliple form in one main form ...
 Originally Posted by MarkT
The only way I could see you wouldn't be able to use form A is if you were using vbModal when calling the other forms
I'm guessing you are using this syntax
If you drop vbModal you should have access to the other visible forms in your projects.
Mark
You are a mind reader 
Spoo
-
May 29th, 2009, 12:50 AM
#10
Frenzied Member
Re: muliple form in one main form ...
There are a couple of things to note about the show method...
This makes it so that the form you show must be closed before you can once again access the calling form...
Code:
Form2.Show vbModal, Me
as does this...
but this allows you to access the calling form but will keep the called form on top of the zorder even when the calling form recieves the focus...
Code:
Form2.Show vbModeless, Me
while this
Code:
Form2.Show vbModeless
is the same as this
which allows the forms zorder to exchange positions
Good Luck
Option Explicit should not be an Option!
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
|