axWindowsMediaPlayer moving different location
hi this is my first time in writing this forum, i am having problems that when i move the panel to another location while the wmplayer is playing when viewing the movie the wmplayer is blinking how can i stop this from happening what is the code. I actually dont want it to blink while moving the movie hope you understand my problem
my code
public void panelmove()
{
axWindowsMediaPlayer1.URL = @"C:\A.AVI";
for (int i = 0; i < 450; i++)
{
System.Threading.Thread.Sleep(100);
Application.DoEvents();
panel1.Location = new Point(100,i);
if (i == 400)
{
panelmove();
}
Kirtan PatelPosted Aug 23, 2009, 4:54 PM
using System.Runtime.InteropServices;
[DllImport("user32.dll")]
public static extern bool LockWindowUpdate(IntPtr hWndLock);
public void panelmove()
{
axWindowsMediaPlayer1.URL = @"D:\Songs\Music Videos\Video Songs DVDs\11_-_Stay_With_Me.wmv";
for (int i = 0; i < 450; i++)
{
System.Threading.Thread.Sleep(100);
Application.DoEvents();
panel1.Location = new Point(100, i);
if (i == 400)
{
LockWindowUpdate(axWindowsMediaPlayer1.Handle);
panelmove();
LockWindowUpdate(IntPtr.Zero);
}
}
}
danone elmasPosted Aug 23, 2009, 11:43 PM