D
D
DD-var2020-11-23 19:48:20
C++ / C#
DD-var, 2020-11-23 19:48:20

How to move an image separately?

There are 2 pictures in the picture box, how can I move them separately?

the code:

private void pictureBox3_Paint(object sender, PaintEventArgs e)
        {
            Image c = sender as Image;

            Mg = new Bitmap(Mg, new Size(20, 20));
           // e.Graphics.DrawImageUnscaled(Mg, cx, cy);
            e.Graphics.DrawImageUnscaled(c, 20, 20);
        }

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
BasiC2k, 2020-11-23
@BasiC2k

The resulting picture in the pictureBox is an indivisible image. Therefore, use pictureBox only for display, and keep the original pictures in memory and move.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question