Results 1 to 11 of 11

Thread: Form border as "Single" without titlebar

  1. #1

    Thread Starter
    Frenzied Member stateofidleness's Avatar
    Join Date
    Jan 2009
    Posts
    1,780

    Form border as "Single" without titlebar

    Quick question,
    I have a form that I want to keep the border on, but no titlebar.

    An example is a form with FormBorderStyle set to FixedSingle, then set the Form's Text to nothing. This is what I'm after, however, I want to maintain the "Blue" styling of Windows XP. When doing this, it currently makes the form gray like it stops using visual styles.

    is there any way to get the blue "Single" border around my form without the Titlebar?

  2. #2
    Lively Member
    Join Date
    Jan 2010
    Location
    Republic of Macedonia
    Posts
    114

    Re: Form border as "Single" without titlebar

    set the FixedToolWindow to FixedSingle, then set the Form's Text to " " (an empty space, not "") and it will behave as you expect.

  3. #3

    Thread Starter
    Frenzied Member stateofidleness's Avatar
    Join Date
    Jan 2009
    Posts
    1,780

    Re: Form border as "Single" without titlebar

    hmm, didn't work for me. here's a screenshot with your suggestion.
    Attached Images Attached Images  

  4. #4
    Lively Member
    Join Date
    Jan 2010
    Location
    Republic of Macedonia
    Posts
    114

    Re: Form border as "Single" without titlebar

    And you expect what? Not this wide title bar? Please explain!

  5. #5

    Thread Starter
    Frenzied Member stateofidleness's Avatar
    Join Date
    Jan 2009
    Posts
    1,780

    Re: Form border as "Single" without titlebar

    the border on the left, right, and bottom. that is what i want on the top as well. If i set the FormBorderStyle to FixedSingle (like the screenshot) and then set the Text to "", it displays like I want, except it changes the color from blue to gray. I want blue

  6. #6
    Stack Overflow mod​erator
    Join Date
    May 2008
    Location
    British Columbia, Canada
    Posts
    2,824

    Re: Form border as "Single" without titlebar

    Set the text to Alt+0160.

    P.S. If you set the text to something else, does it turn blue? Or have you been trying it with "" this whole time?

  7. #7

    Thread Starter
    Frenzied Member stateofidleness's Avatar
    Join Date
    Jan 2009
    Posts
    1,780

    Re: Form border as "Single" without titlebar

    i've tried it blank and with a single space. both don't work. i'll try the Alt+ one and report back

    EDIT: Alt trick doesn't work

  8. #8
    Lively Member
    Join Date
    Jan 2010
    Location
    Republic of Macedonia
    Posts
    114

    Arrow Re: Form border as "Single" without titlebar

    I was able to make it using a little trick. Have a look at the attached project below. Basically it is a border-less form with a four docked label controls
    Attached Images Attached Images  
    Attached Files Attached Files
    Last edited by kulrom^; Feb 8th, 2010 at 07:56 PM.

  9. #9
    Stack Overflow mod​erator
    Join Date
    May 2008
    Location
    British Columbia, Canada
    Posts
    2,824

    Re: Form border as "Single" without titlebar

    No, I mean with something like "Hello".

    You could also, if nothing else works, change the FormBorderStyle to None, override WndProc for motion, and set the BackgroundImage to a screenshot of a form in the designer without any title text, possibly with some editing (put a Button on the form, select it, take a screenshot, use a photo editor to delete the inside of the form and save it as a 32-bit PNG). Enjoy!

  10. #10

    Thread Starter
    Frenzied Member stateofidleness's Avatar
    Join Date
    Jan 2009
    Posts
    1,780

    Re: Form border as "Single" without titlebar

    Quote Originally Posted by kulrom^ View Post
    I was able to make it using a little trick. Have a look at the attached project below. Basically it is a border-less form with a four docked label controls

    ha that's pretty neat and i actually thought about going that route (with docking and/or images) but thought maybe there was an easier way to just "FixedSingle" the form with no titlebar

  11. #11
    Lively Member
    Join Date
    Jan 2010
    Location
    Republic of Macedonia
    Posts
    114

    Re: Form border as "Single" without titlebar

    You may want to check out the following article and probably play around with it:
    http://www.dreamincode.net/forums/showtopic64981.htm

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