views:

109

answers:

1

I'm trying to use transparency key. According to the documentation, you're supposed to be able to use this to put "holes" in the Application where you're supposed to be able to click through the transparent areas in the application and work (eg. "click" on things behind it). However, in Vista Ultimate 64bit , I can't. The following code does not work in Vista, but will in XP Pro.

Public Class Form1
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.BackColor = Color.Red
        Me.TransparencyKey = Me.BackColor
    End Sub
End Class

Does anyone have any leads as to why Win XP works with this code, while Win Vista does not allow one to click through the hole in the window?

+1  A: 

Hi,

I know that this doesn't make any sense. But it is working for me. What I did was instead of referencing the color using Mr.BackColor, I just used the color again, like this:

Public Class Form1
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.BackColor = Color.Red
        Me.TransparencyKey = Color.Red
    End Sub
End Class

Does this work for you?

lucifer
Are you using a 32 bit operating system? I seem to only see the error on 64 bit versions of Windows.
Speedy2171
I have recently purchased an new computer and revisited this post today. I can confirm that this does not work on 64-bit version of Windows 7 - Home Premium. However, at the time of posting my answer, it was working on Windows 7 Home Premium **and** Windows Vista Home Basic, both of which were running on 32-bit computers.
lucifer