This is my first time working in visual studio ,previously i made a gui on ubuntu with qt but now have create the same in visual studio.I have a picturebox
inwhich i am displaying a continuous feed from a camera.
Now i want that whenever i move my cusor anywhere on the picturebox it draws a vertical and horizontal line across the picturebox with mouse cursor as intersection without effecting the feed image
in the picturebox and draw a rectangle for ROI again without effecting the image in picture box.
QT result is given below:


I tried graphic approach but it did'nt gave me required result
Pen^ pen1x = gcnew Pen(Color::Black);
Graphics^ g_cam1_cal;
private: System::Void cam1_calib_imagebox_MouseMove(System::Object^ sender, System::Windows::Forms::MouseEventArgs^ e) {
if (!g_cam1_cal)
g_cam1_cal = cam1_calib_imagebox->CreateGraphics();
g_cam1_cal->Clear(Color::Empty);
g_cam1_cal->DrawLine(pen1x, e->X, 0, e->X, cam1_calib_imagebox->Height);
Result:

when cursor was moved
