The yellow objects on my form show the transparency of the click-through

I have a problem with yellow objects being "clicked" on multiple vb6 forms in my application:

Image Example

The only thing I can think of that might affect this is the following (from VBForums , which I used to make the blue elements transparent, as you can see in the image, however this shouldn't affect vbYellow.

Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" ( _
            ByVal hwnd As Long, _
            ByVal nIndex As Long) As Long

Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" ( _
            ByVal hwnd As Long, _
            ByVal nIndex As Long, _
            ByVal dwNewLong As Long) As Long

Private Declare Function SetLayeredWindowAttributes Lib "user32" ( _
            ByVal hwnd As Long, _
            ByVal crKey As Long, _
            ByVal bAlpha As Byte, _
            ByVal dwFlags As Long) As Long

Private Const GWL_STYLE = (-16)
Private Const GWL_EXSTYLE = (-20)
Private Const WS_EX_LAYERED = &H80000
Private Const LWA_COLORKEY = &H1
Private Const LWA_ALPHA = &H2

Private Sub Form_Load()
Me.BackColor = vbCyan
SetWindowLong Me.hwnd, GWL_EXSTYLE, GetWindowLong(Me.hwnd, GWL_EXSTYLE) Or WS_EX_LAYERED
SetLayeredWindowAttributes Me.hwnd, vbCyan, 0&, LWA_COLORKEY
End Sub

      

I tried to replace the vbYellow form with an image of the same color. This will also have the plus of a Click function, but ends up with the same result without even triggering any Click Click function.

+3
vb6


source to share


No one has answered this question yet

See similar questions:

12
C # Form.TransparencyKey works differently for different colors, why?

or similar:

4
Can a Visual Basic 6 class property type be an enumeration
2
How do I get the DeleteUrlCacheEntry () error codes? (Or more information on why the specific delete isn't working)?
2
VB6 SetWindowLong causes update issue on Windows 7 64-bit
1
Converting dllimport from vb6 to C # 3.5
1
C # Structures VB6 and vice versa
0
Is the App.TaskVisible property applicable to standard EXEs?
0
Will a DLL linked to an interface with Delphi, VB6 or VB.NET work with C ++?
0
C # Using VB6 API
0
Need to run Excel macro with administrator mode in VB 6.0
-2
how to get active browser tab chrome chrome url (vb6)



All Articles
Loading...
X
Show
Funny
Dev
Pics