I have built an application using Windown Form in C#. The picture box original location is A.
In this application, I use button to move position of Picture box. When I press the button, this picture box will move to another position (Location B), but when I minimize application and restore it again, then the picture box return to its original position (Location A).
How can I fix this problem?
private void movePictureBox(int xPos, int yPos) {
pBox8Button.BeginInvoke( new Action(() => {
pBox8Button.Location = new Point(xPos, yPos);
} ));
}
I am using BeginInvoke, because I al running some thread.
The new position when I moved Picture box:
The position when I minimize and restore: