PDA

Click to See Complete Forum and Search --> : Activating Child Windows Only


a2427
Oct 31st, 2000, 05:46 AM
I want to activate only a child window from a parent without the parent being "shown". Is it programmatically possible.

Oct 31st, 2000, 02:20 PM
Make the parent Form transparent, and you can make all your child windows visible.

a2427
Nov 1st, 2000, 08:25 PM
I guess the obvious question is how to make the parent window transparent. I am guessing there is an api call for this, maybe ShowWindow? If you know tha api to do this please let me know.

Nov 2nd, 2000, 03:02 PM
Add the following to a form with a Timer.

Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Const GWL_EXSTYLE = (-20)
Const WS_EX_TRANSPARENT = &H20&

Private Sub Timer1_Timer()
SetWindowLong hwnd, GWL_EXSTYLE, WS_EX_TRANSPARENT
End Sub

a2427
Nov 2nd, 2000, 08:44 PM
Thanks Megatron, I will play around with what you have given me.

So many useful API calls, so little knowledge of them.