Results 1 to 11 of 11

Thread: Need help removing title bar.

  1. #1
    Red Rush-In
    Guest

    Need help removing title bar.

    I'm creating a form with the border style set to 0 (None) and I want to have pop up menus accessible from the form. Even though the menu items are marked to not be visible, VB forces a visible title bar onto the form.

    Is there any way to remove a title bar from a form that has menus on it? I would like to avoid calling menus from other forms if I can.

  2. #2
    C# Aficionado Lord_Rat's Avatar
    Join Date
    Sep 2001
    Location
    Cave
    Posts
    2,497
    Make the caption equal "" and no controls on the form.
    Need to re-register ASP.NET?
    C:\WINNT\Microsoft.NET\Framework\v#VERSIONNUMBER#\aspnet_regiis -i

    (Edit #VERSIONNUMBER# as needed - do a DIR if you don't know)

  3. #3
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    what kind of answer is that? That wouldnt help him?
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  4. #4
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    more than likely you are going to need to create the popupmenu via the api. I think planet-source-code.com has some examples of this.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  5. #5
    C# Aficionado Lord_Rat's Avatar
    Join Date
    Sep 2001
    Location
    Cave
    Posts
    2,497
    No, you obviously have no CLUE what the hell you are talking about.

    I attached a form that does exactly what he wants, in the way I described.

    The only difference is that I am not checking which mouse button (right or left) is being clicked on the form to pop up the menu. I pop it up on either one.
    Attached Files Attached Files
    Need to re-register ASP.NET?
    C:\WINNT\Microsoft.NET\Framework\v#VERSIONNUMBER#\aspnet_regiis -i

    (Edit #VERSIONNUMBER# as needed - do a DIR if you don't know)

  6. #6
    C# Aficionado Lord_Rat's Avatar
    Join Date
    Sep 2001
    Location
    Cave
    Posts
    2,497
    And, for completeness, you can set the border style to none and it still works.
    Need to re-register ASP.NET?
    C:\WINNT\Microsoft.NET\Framework\v#VERSIONNUMBER#\aspnet_regiis -i

    (Edit #VERSIONNUMBER# as needed - do a DIR if you don't know)

  7. #7
    Red Rush-In
    Guest
    Lord_Rat, removing the caption for the form did the trick. Kind of weird results though....

    Caption - Yes
    Menu - No
    BorderStyle - None
    Title Bar Not Visible

    Caption - Yes
    Menu - Yes
    BorderStyle - None
    Title Bar Visible

    Caption - No
    Menu - Yes
    BorderStyle - None
    Title Bar Not Visible

    Originally posted by Cander
    more than likely you are going to need to create the popupmenu via the api.
    Yeah thats what I thought I was going to have to do.

    Thanks again Lord_Rat.

  8. #8
    C# Aficionado Lord_Rat's Avatar
    Join Date
    Sep 2001
    Location
    Cave
    Posts
    2,497
    Any time
    Need to re-register ASP.NET?
    C:\WINNT\Microsoft.NET\Framework\v#VERSIONNUMBER#\aspnet_regiis -i

    (Edit #VERSIONNUMBER# as needed - do a DIR if you don't know)

  9. #9
    Addicted Member chander's Avatar
    Join Date
    Nov 2000
    Location
    New Delhi , India
    Posts
    225
    is there aney way by which i can remove title bar at run time .. means i load a form with title bat and all controls but at certain time while running my app i want to remove title bar .. i tried with borderstyle 0 but i think at run time it dont work ... i dont ahve ne menu on form ...

    ne suggestion .......
    Chander
    Email:[email protected]

  10. #10
    C# Aficionado Lord_Rat's Avatar
    Join Date
    Sep 2001
    Location
    Cave
    Posts
    2,497
    Updated some
    Attached Files Attached Files

  11. #11
    Addicted Member chander's Avatar
    Join Date
    Nov 2000
    Location
    New Delhi , India
    Posts
    225
    its ok but i am having control box also on form with this example control box is not going away .. i want to remove control box also ...
    Chander
    Email:[email protected]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width