How to Change the Video Size When Controls Resize By Using DirectShow.Net

I have faced an issue yesterday, I can't change the video graph by keeping a fixed a ratio. The original graph is as below:


original.png

However, I change the UserControl' size, it shows as this:


small.png

I know the window just shrinks, but the graph is only part of the original image. I used many ways to solve the problem but failed until I searched the answer
Directshow video player change the player size ,I know there is a method like MainForm_ResizeMove from the DirectShow samples. I use some key words to search the sample codes by Everything and find MoveVideoWindow function. I know it must reset the window position (Call SetWindowPosition function). Then, It works.

你可能感兴趣的:(How to Change the Video Size When Controls Resize By Using DirectShow.Net)