开发者

Find my Error in code

Point out my Error

am doing some video process

am render my video in a Picturebox.... here my problem is if i resize the picturebox i need to resize video also .

[DllImport("user32.dll", EntryPoint = "SetWindowPos")]
    public static extern bool SetWindowPos(IntPtr hWnd, string hWndInsertAfter, int x, int Y, int cx, int cy, uint wFlags);

this is code am using for resize my player like

const uint SWP_NOMOVE = 0X2;
            const uint SWP_NOSIZE = 1;
            const uint SWP_NOZORDER = 0X4;
            const uint SWP_SHOWWINDOW = 0x0040;
            const UInt32 SWP_SHOWWINDOWS = 64;
    SetWindowPos(ptr, null, 0, 0, pictureBox1.Width, pictureBox1.Height, SWP_NOZORDER | SWP_NOMOVE);

ptr-> this is players handle which will added in picturebox

here my player getting resized and am manully change the pictureBox size. but in player it getting resized and it's render the video in correct size which i gave .but in pictureBox it's show in initial place only it's not getting resized ... please poin开发者_JS百科t out my error... thanks in advance

i belive here it's have some mismatch problem between picturebox and player window....


You need to set PictureBoxSizeMode and use the ClientSize property to resize it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜