I'm in progress with my first application in visual basic, and I'm using the visual basic studio... I have created a form, with buttons - form has an background image with rounded corners and I can not set its color to "transparent" because the following error occurs:
Control does not support transparent background colors.
Now I have no idea what to do. I have read that I can set the transparency in the code, by adding the following lines:
SetStyle(ControlStyles.SupportsTransparentBackColor, True)
Me.BackColor = Color.Transparent
But it doesn't seem to work... So what else can I do?
The whole code:
Public Class Form1
Private Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
MsgBox("Test", 32, "Button Click")
End Sub
Private Sub Button2_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button2.Click
Close()
End Sub
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
SetStyle(ControlStyles.SupportsTransparentBackColor, True)
Me.BackColor = Color.Transparent
End Sub
End Class