Results 1 to 6 of 6

Thread: [2005] [RESOLVED]problem with border transparency

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2007
    Posts
    7

    [2005] [RESOLVED]problem with border transparency

    Hi,

    I have a form with an image (bmp 16bit) as background.
    The transparency is set to magenta...but I have a problem, the magenta color is tranparent but not totally...look at the corner. Any idea to resolve that?




    Bye
    Last edited by livai; Jul 17th, 2007 at 12:20 AM.

  2. #2
    PowerPoster VBDT's Avatar
    Join Date
    Sep 2005
    Location
    CA - USA
    Posts
    2,922

    Re: [2005] problem with border transparency

    Create region and assing it to the forms region instead of using transparency.

  3. #3

    Thread Starter
    New Member
    Join Date
    Jul 2007
    Posts
    7

    Re: [2005] problem with border transparency

    Quote Originally Posted by VBDT
    Create region and assing it to the forms region instead of using transparency.
    Hum sorry but how can I do that

  4. #4
    PowerPoster VBDT's Avatar
    Join Date
    Sep 2005
    Location
    CA - USA
    Posts
    2,922

    Re: [2005] problem with border transparency

    You create GraphicsPath which will be the shape of your form and then you can creat the region easly with the path and assing it to the forms region.

  5. #5

    Thread Starter
    New Member
    Join Date
    Jul 2007
    Posts
    7

    Re: [2005] problem with border transparency

    Solved with that,



    Code:
    Imports System.Drawing.Drawing2D
    
    
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            'Dim windowRegion As Region
            Dim regionPoints(10) As Point
            Dim regionTypes(10) As Byte
            regionPoints(0) = New Point(14, 0)
            regionPoints(1) = New Point(682, 0)
            regionPoints(2) = New Point(684, 1)
            etc...
    
            Dim Cnt As Long
            For Cnt = 0 To 10
                regionTypes(Cnt) = PathPointType.Line
            Next Cnt
            Dim regionPath As New GraphicsPath _
                (regionPoints, regionTypes)
            Me.Region = New Region(regionPath)
        End Sub
    Thanks

  6. #6
    PowerPoster VBDT's Avatar
    Join Date
    Sep 2005
    Location
    CA - USA
    Posts
    2,922

    Re: [2005] [RESOLVED]problem with border transparency

    I am glad to hear that.

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