?
Solved

A form w/ a menu but w/out the title bar...

Posted on 1998-06-28
8
Medium Priority
?
150 Views
Last Modified: 2010-05-03
i've made a form that has a menu in it but i don't want the title bar showing.  but because the menu is there, i can't get rid of the title bar.  even though the borderstyle of the form is set to "none", the title bar is still there!!!  how can i get rid of it??  i'm using vb4-32
0
Comment
Question by:llcoolmel
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +1
8 Comments
 

Author Comment

by:llcoolmel
ID: 1464454
Edited text of question
0
 
LVL 2

Expert Comment

by:ndnet
ID: 1464455
Make the menu a popup. (Right CLick, with sub menus.) Just create a regular menu with the menus you would want as submenus in it. Then use the following code and change the second word in the 3rd line for the name of your menu.

Private Sub Form_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
      If Button = 2 Then
            PopupMenu mnuFile
      End If
End Sub




0
 

Author Comment

by:llcoolmel
ID: 1464456
i have already tried that and i tried it again...still can't get rid of the title bar.  i have also tried making the menu not visible and popup in the form but the title bar is still there.  
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 6

Accepted Solution

by:
alamo earned 600 total points
ID: 1464457
You have to get rid of the menu on your form... even though your border is set to none, the presence of a menu will cause the menu to be shown (as you've found).

But that doesn't matter: the pop-up menu doesn't need to be in the same form. Here's the procedure:

Your main form is Form1. Create it with no menu and no border.
Create Form2 with a single menu item (named mnuFile, for example) and place the menu items you want in your pop-up menu as submenu items.

In Form1 add the popup menu as follows (a slight mdification of what's shown in the Help Example)

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If Button = 2 Then
        PopupMenu Form2.mnuFile
    End If
End Sub

Notice that instead of "PopupMenu mnuFile" it's "PopupMenu Form2.mnuFile". Now Form1 will have no title bar but will have a popup menu.

If you want your menu items to activate Subs inside Form1 (if they need access to Private data, for example), then make those Subs Public and make your menu items in Form2 do nothing except call those Subs.

One more thing - you must put "Unload Form2" in your Form1_Unload sub, so that the app shuts down properly.

Hope this does what you need, good luck!
0
 

Author Comment

by:llcoolmel
ID: 1464458
"...i love you..."
0
 
LVL 6

Expert Comment

by:alamo
ID: 1464459
LOL, glad I could help!
0
 
LVL 2

Expert Comment

by:ndnet
ID: 1464460
Not to be critical here, but I came up with the idea of a poup menu in the first place.
0
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1464461
Bought This Question.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question