public void ClickUploadImage(int offsetX, int offsetY) { form.InvokeSafe(() => { Point prevPos = Cursor.Position; Cursor.Position = form.PointToScreen(new Point(offsetX, offsetY)); NativeMethods.SimulateMouseClick(NativeMethods.MouseButton.Left); Cursor.Position = prevPos; form.OnImagePastedFinish(); }); }