private void btUpdateRect_Click(object sender, EventArgs e) { int index = lbSourceFiles.SelectedIndex; if (index >= 0) { int left = Convert.ToInt32(edPIPFileLeft.Text); int top = Convert.ToInt32(edPIPFileTop.Text); int width = Convert.ToInt32(edPIPFileWidth.Text); int height = Convert.ToInt32(edPIPFileHeight.Text); _pipInfos[index].Rect = new Rectangle(left, top, width, height); _pipInfos[index].ZOrder = Convert.ToInt32(edZOrder.Text); _pipInfos[index].Alpha = tbStreamTransparency.Value / 100.0f; if (left == 0 && top == 0 && width == 0 && height == 0) { lbSourceFiles.Items[index] = $@"{_pipInfos[index].Filename} (entire screen)"; } else { lbSourceFiles.Items[index] = $@"{_pipInfos[index].Filename} ({left}.{top}px, width: {width}px, height: {height}px)"; } MediaPlayer1.PIP_Sources_SetSourcePosition(index, _pipInfos[index].Rect, tbStreamTransparency.Value / 100.0f); MediaPlayer1.PIP_Sources_SetSourceOrder(index, _pipInfos[index].ZOrder); } }