Sounds like your tab is being destoryed and recreated.
...Glenn
On Tue, Oct 7, 2008 at 2:53 AM, 沈斌 <[EMAIL PROTECTED]> wrote:
> When I am trying to move a control at runtime in a tabPage by using
> WM_NCHITTEST, though the control is seen dragged to a new location,
> but when then tabPage is goes down and up again. the location of the
> previously dragged control goes back to its original location.
> So what's wrong?
>
> The control code:
>
> class DraggablePicBox : PictureBox
> {
> private const int WM_NCHITTEST = 0x84;
> private const int HTCLIENT = 0x1;
> private const int HTCAPTION = 0x2;
>
> public bool DraggAble
> {
> get;
> set;
> }
>
> protected override void WndProc(ref Message m)
> {
> base.WndProc(ref m);
> if (this.DraggAble && m.Msg == WM_NCHITTEST)
> {
> if ((int)m.Result == HTCLIENT)
> m.Result = (IntPtr)HTCAPTION;
> }
> }
>
> }
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web
Services,.NET Remoting" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/DotNetDevelopment
You may subscribe to group Feeds using a RSS Feed Reader to stay upto date
using following url
<a href="http://feeds.feedburner.com/DotNetDevelopment">
http://feeds.feedburner.com/DotNetDevelopment</a>
-~----------~----~----~----~------~----~------~--~---