I managed to figure something out that will do the trick, gonna leave it here if someone else needs it in the future.
private void MouseUp(object sender, MouseEventArgs e)
{
Point ptCursor = Cursor.Position;
ptCursor = PointToClient(ptCursor);
PictureBox pBox = (PictureBox)GetChildAtPoint(ptCursor);
pBox.BackColor = System.Drawing.Color.Blue;
}
I set up a simple form with some pictureboxes and when the mouseup-event happens it checks for the control under the cursors position and you can then use that for your needs. The problem i was having was that the mouseup event was tied to the control where the mousedown-event happened, and thus i couldn't access the control the cursor was in when the mouseup-event happened.
I have only been programming for about 4 weeks so this solution might be very flawed so if there are any problems with it some feedback would be great.