private void btn_apply_Click(object sender, EventArgs e) { effect = new Grayscale(); effect.setRGBcoeffs(r, g, b); this.Close(); }