animatewindow

How can I use the AnimateWindow function on a separate thread?

泪湿孤枕 提交于 2019-12-04 05:59:24
问题 How can I animate two windows at the same time? I tried: [DllImport("user32.dll", CharSet = CharSet.Auto)] static extern bool AnimateWindow(IntPtr hwnd, int time, int flags); ... AnimateWindow(panel1.Handle, speed, AW_SLIDE | AW_HOR_Top); AnimateWindow(panel2.Handle, speed, AW_SLIDE | AW_HOR_Top); But panel2 will not animate until panel1 finished its animation. I must use the threading .. but i can't even if i used invoke .. also it runs the 2nd animation after the 1st so how can i do it ?

How can I use the AnimateWindow function on a separate thread?

佐手、 提交于 2019-12-02 11:51:32
How can I animate two windows at the same time? I tried: [DllImport("user32.dll", CharSet = CharSet.Auto)] static extern bool AnimateWindow(IntPtr hwnd, int time, int flags); ... AnimateWindow(panel1.Handle, speed, AW_SLIDE | AW_HOR_Top); AnimateWindow(panel2.Handle, speed, AW_SLIDE | AW_HOR_Top); But panel2 will not animate until panel1 finished its animation. I must use the threading .. but i can't even if i used invoke .. also it runs the 2nd animation after the 1st so how can i do it ? Joel Lucsy If both windows were created by the same thread, then the AnimateWindow function will run on