|
-
Jan 27th, 2009, 02:04 PM
#1
Thread Starter
New Member
Menu question
I have an application that uses differents forms. Is there an advantage too using menus (ctrl-e) vs. click .show the form? ALso, how do I turn off the visability of the previous form after the new one appears. Thanks.
-
Jan 27th, 2009, 02:15 PM
#2
Re: Menu question
Is there an advantage too using menus (ctrl-e) vs. click .show the form?
I couldn't understand your question. Can you be a bit more clear?
ALso, how do I turn off the visability of the previous form after the new one appears.
To hide a form you call the Form's Hide method
vb Code:
Form1.Hide '<-- Hides Form1
The other way is to hide the form before you show the other form
vb Code:
Me.Hide ' Hide current form Form2.Show vbModal ' Show the other form Me.Show 'Show the form again after the 2nd form is closed
-
Jan 27th, 2009, 02:17 PM
#3
Re: Menu question
Advantages of menus?
1. Menus can offer functions that are not provided from controls on the form. For example. Many applications do not offer a "search button" but may offer a "Search" menu item.
2. Going with what I said in #1 above, menus can replace unnecessary controls on a form, thus preserving form real estate.
3. Accelerator items (i.e., Ctrl+C) can be more user-friendly for keyboard-junkies vs mouse-junkies. You'll never see me clicking Edit | Copy on a menu; I will hit Ctrl+C every time as that is my preference.
To make a form invisible you can do 1 of 2 things.
1. If the form is no longer needed and any user-entered data on that form is also no longer needed: Unload FormX from outside of the form or Unload Me from within the form.
2. FormX.Visible = False from outside the form. Me.Visible=False from within.
Edited: Pradeep1210's suggestion of using .Hide works as well.
-
Jan 27th, 2009, 02:21 PM
#4
Thread Starter
New Member
Re: Menu question
I was just popping menu prompts(forms) up on the screen but I noticed an example of one that used mnu commands. Seems like alot of extra worl to call the menu then then the menu to call the new form. I am sure someday I will use it, still a VB virgin.
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
|