C# Panel DirectShow Video ScrollBar
public System.Windows.Forms.Panel pnlVideo;
public QuartzTypeLib.FilgraphManager m_objFilterGraph = null;
public QuartzTypeLib.IBasicAudio m_objBasicAudio = null;
public QuartzTypeLib.IVideoWindow m_objVideoWindow = null;
public QuartzTypeLib.IMediaEvent m_objMediaEvent = null;
public QuartzTypeLib.IMediaEventEx m_objMediaEventEx = null;
public QuartzTypeLib.IMediaPosition m_objMediaPosition = null;
public QuartzTypeLib.IMediaControl m_objMediaControl = null;
m_objVideoWindow.SetWindowPosition(pnlVideo.ClientRectangle.Left,
pnlVideo.ClientRectangle.Top,
pnlVideo.ClientRectangle.Height * (int)videoResolutionRate,
pnlVideo.ClientRectangle.Height);
m_objVideoWindow shows the video at original rate
1. ScrollBar Padding 20px
m_objVideoWindow.SetWindowPosition(pnlVideo.ClientRectangle.Left,
pnlVideo.ClientRectangle.Top,
(pnlVideo.ClientRectangle.Height - 20) * (int)videoResolutionRate,
pnlVideo.ClientRectangle.Height - 20);
2. Size and Scroll Bar Enable
pnlVideo.HorizontalScroll.Visible = true;
pnlVideo.AutoScroll = true;
pnlVideo.MaximumSize = new Size(this.ClientSize.Width, this.ClientSize.Height - 80);
pnlVideo.AutoScrollMinSize = new Size((int)UserControl1.videoResolutionRate * (this.ClientSize.Height - 80), this.ClientSize.Height - 80);
pnlVideo.ClientSize = new Size(this.ClientSize.Width, this.ClientSize.Height - 80);
pnlVideo.Size = new Size(this.ClientSize.Width, this.ClientSize.Height - 80);
'Programming > C#' 카테고리의 다른 글
Audio Wave Form Renderer (0) | 2018.10.24 |
---|---|
참조 dll 강력키 생성 방법 (0) | 2018.09.10 |
C# 에서 C++ DLL 불러서 쓰기 #5 (0) | 2018.02.15 |
C# 에서 C++ DLL 불러서 쓰기 #4 (0) | 2018.02.14 |
C# 에서 C++ DLL 불러서 쓰기 [도움되는 링크들] (0) | 2018.02.13 |