I've made a form which 'appears' to be transparent, using screen capture and alpha blending.

I want to make it so that if a user clicks my form, the mouse, and may be key clicks, pass through my form to what ever is underneath.

I found some code on PSC that can do this, but I believe it will only work on Win2K and up.
http://www.planet-source-code.com/vb...60484&lngWId=1

I'd like this to work on Win98 and up.

Here's what I've tried so far.
I can add the API's if you need them

VB Code:
  1. Private Sub Form_Load()
  2. '    frmClickTo.Show
  3.     FormTopMost Me
  4. End Sub
  5. '
  6. Private Sub Form_MouseDown(Button As Integer, Shift As Integer, x As Single, Y As Single)
  7.     Dim iX As Integer
  8.     Dim iY As Integer
  9.     Dim Pos As PointAPI
  10.     Dim lHwnd As Long
  11.  
  12.     GetCursorPos Pos
  13.     Me.Visible = False
  14.     DoEvents
  15.     lHwnd = WindowFromPoint(Pos.x, Pos.Y)
  16.     SetForegroundWindow lHwnd
  17.     SysSetFocus lHwnd
  18.  
  19.     DoEvents
  20.     Select Case Button
  21.         Case vbLeftButton
  22. '            mouse_event MOUSEEVENTF_LEFTDOWN, Pos.X, Pos.Y, 0, 0
  23.             mouse_event MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0
  24. '            mouse_event MOUSEEVENTF_LEFTUP, 0, 0, 0, 0
  25.         Case vbRightButton
  26.             mouse_event MOUSEEVENTF_RIGHTDOWN, 0, 0, 0, 0
  27.         Case vbMiddleButton
  28.             mouse_event MOUSEEVENTF_MIDDLEDOWN, 0, 0, 0, 0
  29.     End Select
  30.     Me.Visible = True
  31. End Sub
  32.  
  33. Private Sub Form_MouseUp(Button As Integer, Shift As Integer, x As Single, Y As Single)
  34.     Dim Pos As PointAPI
  35.    
  36.     GetCursorPos Pos
  37.     Me.Visible = False
  38.     DoEvents
  39.     lHwnd = WindowFromPoint(Pos.x, Pos.Y)
  40.     SetForegroundWindow lHwnd
  41.     SysSetFocus lHwnd
  42.  
  43.     DoEvents
  44. 'Debug.Print x
  45. 'Debug.Print Pos.x
  46. 'Debug.Print
  47. 'Debug.Print Y
  48. 'Debug.Print Pos.Y
  49.  
  50.     Me.Visible = False
  51.     DoEvents
  52.     Select Case Button
  53.         Case vbLeftButton
  54.             mouse_event MOUSEEVENTF_LEFTUP, 0, 0, 0, 0
  55.         Case vbRightButton
  56.             mouse_event MOUSEEVENTF_RIGHTUP, 0, 0, 0, 0
  57.         Case vbMiddleButton
  58.             mouse_event MOUSEEVENTF_MIDDLEUP, 0, 0, 0, 0
  59.     End Select
  60.     Me.Visible = True
  61. End Sub