I write this code to open and run windows media player. Its work correctly. But there is little problem as I upload any song the size of my window squeeze. Can you please tell me which value or parameters I need to change?
Thanks
NOTE:
private System.Windows.Forms.OpenFileDialog openMediaFileDialog;
private AxMediaPlayer.AxMediaPlayer axWindowsMediaPlayer1;
private void browsButton_Click(object sender, EventArgs e)
{
openMediaFileDialog.ShowDialog();
axWindowsMediaPlayer1.URL = openMediaFileDialog.FileName;
axWindowsMediaPlayer1.Size = new Size(300, 200);
this.Size = new Size(axWindowsMediaPlayer1.Size.Width + 60, axWindowsMediaPlayer1.Size.Height + 100);
}
Muteen ul HaqPosted Sep 5, 2010, 12:48 PM
Pasan RatnayakePosted Sep 5, 2010, 12:09 PM
If that is your form, I believe it's owing to that last line of ur code. Try commenting that out and running the application.
Hope this helps