this code turns the form invisible. But, it makes the mouses cursor change with the things that are behind it.. How do i get it to where the user can click on the form, and everything else when it isn't invisible?Code: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_EXSTYLE = (-20) Private Const WS_EX_LAYERED = &H80000 Private Const LWA_COLORKEY = &H1& Private Const LWA_ALPHA = &H2& Public d As Long Dim i Dim doa Private Sub Form_Load() BackColor = RGB(127, 127, 0) 'Unique but explicit (non-system) color. Form1.BackColor = BackColor SetWindowLong hWnd, GWL_EXSTYLE, GetWindowLong(hWnd, GWL_EXSTYLE) Or WS_EX_LAYERED SetLayeredWindowAttributes hWnd, BackColor, 0, LWA_COLORKEY End Sub




Reply With Quote