Reputation: 199
I need to create a picturebox on top of a textbox, that when clicked, passes the click onto the picturebox below the textbox. How would I go about doing this? Would I use SendMessage to, somehow, send the click down to the textbox and cancel it on the textbox? If so, what messages would I send?
The picturebox, in Z-order, is above the textbox. However, any event of clicking should be passed as if the textbox was above the picturebox.
Upvotes: 1
Views: 936
Reputation: 51414
If you don't want a window to receive input you have to disable it, calling the EnableWindow function:
Enables or disables mouse and keyboard input to the specified window or control. When input is disabled, the window does not receive input such as mouse clicks and key presses.
Mouse messages go to the topmost window underneath a disabled window.
Upvotes: 1