Можем ли мы разместить картинку в картинку в разных местах?

StackOverflow https://stackoverflow.com/questions/1251414

  •  12-09-2019
  •  | 
  •  

Вопрос

Я использую vb.net

Я просто хочу спросить, можем ли мы разместить картинку в картинку в разных местах ...

Например, мы размещаем картинку в центр картинной коробки, затем разместим еще одну картинку на левую сторону коробки с картинками. Является ли это возможным??

А также мы можем использовать одну коробку с картинками, которая может содержать больше изображений или изображений на нем ???

Чтобы прояснить, это перетаскивание Senario, сначала вам нужно перетащить картинку с панели инструментов, например, вы должны бросить ее на коробку Picutre, проблема в том, что мы должны сбросить более одного изображения в PictureBox, так что это действительно возможно?

Это было полезно?

Решение

To my knowledge, this is not possible with the standard .NET picturebox control.

You could, however, create a custom control that would encompass this functionality. I'm thinking it wouldn't be too complicated to do.

But probably the best way to handle it would be to create your picture box controls programmatically.

EDIT: Found something that might be useful for you, on CodeProject. Its a extended picturebox control, that seems to have multiple pictures in it.

Extended Picturebox

Другие советы

You will need to build all this functionality from scratch no matter which control you're using. You can use Picturebox, Button, Panel and so on, and they'll all provide the same fundemental for building the required functionality. I would suggest that you used a panel/canvas though. And as Jon suggested, subclassing a panel to create a custom control would properably be the best idea.

Inside this custom control, you will need to keep track of which images that have been dragged into the control, which images is affected by several mouse actions such as click, hover and release, and you will need to draw the pictures manually.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top