I have created a bitmap for picture box's DC and draw the rectangle on it. Whenever mouse move, new coordinates has been generated and redraw the rectangle. Finally, attached my custom bitmap into directx frame using SetAlphaBitmap(). The Custom bitmap not originally attached to the video frame, it has been attached when a video frame has ready to visible. I would like to render different frame size of streams from IP-camera, mean while I would like to maintain my picture box size as static.