I'm using a glcontrol for showing continues frames from a video. Now I want to draw a border around this glcontrol. I have done like below. But when resizing or changing the location of the glcontrol this border is not coming. How can I solve this?
private void glControl1_Paint_1(object sender, PaintEventArgs e)
{
ControlPaint.DrawBorder(e.Graphics, this.glControl1.ClientRectangle,
Color.White, 3, ButtonBorderStyle.Solid,
Color.White, 3, ButtonBorderStyle.Solid,
Color.White, 3, ButtonBorderStyle.Solid,
Color.White, 3, ButtonBorderStyle.Solid);
}
private void comboBox1Resolution_SelectedIndexChanged(object sender, EventArgs e)
{
if (comboBox1Resolution.SelectedIndex != -1)
{
videoSource1.VideoResolution =videoSource1.VideoCapabilities[comboBox1Resolution.SelectedIndex];
OpenGL_SizeChanged(videoSource1);//changing size and location of glcontrol
}
}