[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?
http://img129.imageshack.us/img129/1027/borderfm6.jpg
Bye
Re: [2005] problem with border transparency
Create region and assing it to the forms region instead of using transparency.
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 :confused:
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.
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
Re: [2005] [RESOLVED]problem with border transparency