CleanUp(); m_objFilterGraph = new FilgraphManager(); string strFileName = DBUtils.ImagePath + "\\" + strFolderName + "\\" + txtFileID.Text.Trim() + ".AVI"; if (File.Exists(strFileName)) { m_objFilterGraph.RenderFile(strFileName);-Error come this line m_objBasicAudio = m_objFilterGraph as IBasicAudio; try { m_objVideoWindow = m_objFilterGraph as IVideoWindow; m_objVideoWindow.Owner = (int)panel2.Handle; m_objVideoWindow.WindowStyle = WS_CHILD | WS_CLIPCHILDREN; m_objVideoWindow.SetWindowPosition(panel2.ClientRectangle.Left, panel2.ClientRectangle.Top, panel2.ClientRectangle.Width, panel2.ClientRectangle.Height); } catch (Exception) { m_objVideoWindow = null; } m_objMediaEvent = m_objFilterGraph as IMediaEvent; m_objMediaEventEx = m_objFilterGraph as IMediaEventEx; m_objMediaEventEx.SetNotifyWindow((int)this.Handle, WM_GRAPHNOTIFY, 0); m_objMediaPosition = m_objFilterGraph as IMediaPosition; m_objMediaControl = m_objFilterGraph as IMediaControl; m_objMediaControl.Run(); tabCtrlImage.SelectedTab = tbVideo; tbVideo.Focus(); } else return; }
FilgraphManager
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)