没有mousedown时间也没有mousemove事件真的不知道怎么实现了!求助大家了!

解决方案 »

  1.   

    没有mousedown也没有mousemove事件,是很难实现的,为什么不去考虑WebBrowser的父窗体窗体??
      

  2.   

    父窗体就是form了可是我设置它为透明的了响应不到事件啊,我该什么办呢?
      

  3.   

    其实原理很简单啦,就是模拟一下鼠标点击在标题栏而已了。不需要处理onmousemove啦
      

  4.   

    o!,我就随便贴一点代码了host程序中ScriptObject移动窗体的代码        public bool ReleaseCapture()
            {
                return gVar.ReleaseCapture();
            }        public void HitTitle()
            {
                gVar.HitTitle(Container);
            }...        public static void HitTitle(Form form)
            {
                SendMessage(form.Handle, WM_NCLBUTTONDOWN, HTCAPTION, 0);
            }...        [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
            protected static extern int SendMessage(IntPtr hWnd, uint Msg, int wParam, int lParam);
            [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
            public static extern bool ReleaseCapture();
    WebBrowser中的js代码 onmousedown="ReleaseCapture();HitTitle();" 
    ....        function ReleaseCapture()
            {
                if(window.external!=null)
                {
                    window.external.ReleaseCapture();
                }
            }
            
            function HitTitle()
            {
                if(window.external!=null)
                {
                    window.external.HitTitle();
                }
            }
            
      

  5.   

    给个完整的例子我把全部的分都给你了,在我新发布的问题里把全部的分都给你,标题还是怎么能通过WebBrowser控件移动窗体呢?