Results 1 to 5 of 5

Thread: Transperent BG

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 2009
    Posts
    34

    Transperent BG

    I have a form with no border, i have a container to move the box around, but how can i make the main form back ground transmerent or how can i make rounded corners ?

  2. #2
    PowerPoster keystone_paul's Avatar
    Join Date
    Nov 2008
    Location
    UK
    Posts
    3,327

    Re: Transperent BG

    You can set the form's background to a specific colour (of your chosing) and then set the form's transparencykey to that colour.

    If you want to make rounded corners then the best thing to do is create a bitmap and just set the rounded corner background to a specific colour, set the form to use your image as its background image and then set the transparencykey to the colour of your corners. You may have issues with antialising though (not to mention scaling the background if you have a resizable form).

  3. #3

    Thread Starter
    Member
    Join Date
    Nov 2009
    Posts
    34

    Re: Transperent BG

    Everytime i set to Transparent it says

    Code:
    Control does not support transparent background colors.

  4. #4
    PowerPoster keystone_paul's Avatar
    Join Date
    Nov 2008
    Location
    UK
    Posts
    3,327

    Re: Transperent BG

    No thats not what I said - don't set it to transparent.

    Try this... set your BackColor to "Tomato" from the Web colours list in the property picker. Then set the TransparencyKey to "Tomato", add a couple of controls onto the form and run it. All the pixels that at design-time are "Tomato", ie the background of the form, will be transparent.

    Whatever colour you set TransparencyKey to - any pixels of that colour will appear transparent at runtime.

  5. #5

    Thread Starter
    Member
    Join Date
    Nov 2009
    Posts
    34

    Re: Transperent BG

    Works

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