vivek
unread,Feb 14, 2012, 1:24:35 AM2/14/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message as abuse
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Hi,
I am working on windows form application using c#.
I need to set parent a thick client application inside a tab
control(tab page)
The code to set parent is
[DllImport("user32.dll", SetLastError = true)]
static extern IntPtr SetParent(IntPtr hWndChild, IntPtr
hWndNewParent);
SetParent(<thick client application handle>, tabpage handle)
and then am using setwindowpos function to set its position in tab
page
SetWindowPos((int)<thick client application handle>, 0, 0, 0,
this.Width, 0, (uint)SWP_NOZORDER | (uint)SWP_NOSIZE |
(uint)SWP_SHOWWINDOW);
This code works fine in win xp. But for some Win 7 machines after
doing setparent and setpos , the menus and the buttons on that thick
client doesn't work. i.e. they does not response to mouse clicks.
Although the keystrokes works i.e. if i do a tab and press enter
buttons will respond. What is wrong with my code?
Please provide your inputs on the same.
Thanks
Vivek