我想自己做一个控件,这个控件上可以自己画图,也可以在上边不同位置同时放若干图片,而且可能是自绘图做为底图然后再在某些位置放置小图片,因为都是不确定的,所以应该是只能把某一个控件做为容器,我现在用的是pictureBox,可是不知道怎么在PictureBox上同时显示多个图片。
请问:
(1)是不是PictureBox最适合我的要求?
(2)怎样在PictureBox上若干位置上同时显示几个图片?
我是新手也是菜鸟,请多指教
请问:
(1)是不是PictureBox最适合我的要求?
(2)怎样在PictureBox上若干位置上同时显示几个图片?
我是新手也是菜鸟,请多指教
请问Mittermeyer:“在其中调用Graphic的方法绘制图片”怎么做?能详细点吗?我一点头绪没有
{ // Create image.
Image newImage = Image.FromFile("SampImag.jpg"); // Create rectangle for displaying image.
Rectangle destRect = new Rectangle(100, 100, 450, 150); // Create rectangle for source image.
Rectangle srcRect = new Rectangle(50, 50, 150, 150);
GraphicsUnit units = GraphicsUnit.Pixel; // Draw image to screen.
e.Graphics.DrawImage(newImage, destRect, srcRect, units);
}
2.也可以用picturebox设置几个数组达到这个效果
3.LZ的想法很好,可以考虑自定义控件。