在面板上的背景图像上绘制图像 [英] draw image over background image on panel

查看:87
本文介绍了在面板上的背景图像上绘制图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我在vb中开发了一个应用程序,用户可以在其中绘制/创建地图.在这里,他首先导入该地图的图像,然后绘制该图像.
我在vb.net中转换了该应用程序,并希望提供相同的功能.转换该应用程序后,它将在面板上绘制/创建地图,但是图像显示在图片框上.
因此,我将面板背景图像设置为地图图像,并调用RedrawMap()在面板上创建地图.但是创建地图时,它隐藏在背景图像后面,我想在背景图像上显示创建的地图.

hi all,

I had developed an application in vb where user can draw/create map. here he first import the image of that map and then draw over that image.
I converted that application in vb.net and want to give the same functionality. After converting that application it draws/create map on panel but image is showing on picture box.
So i set panels background image to map image and call RedrawMap() for creating map on panel. But when map are created it hides behind background image i want to show created map over background image.

Any solution for it?

推荐答案

图片框是一个愚蠢的主意.编写自己的代码以绘制所有元素,最后绘制的元素将位于顶部.
The picture box is a stupid idea. Write your own code to draw all your elements, and the ones you draw last, will be on top.


chritian,

感谢您的光临.我正在做的是在面板控件上绘图,为此我编写了自己的代码,函数名称为"RedrawMap",代码为panel1.CreateGraphics.Drawline/DrawPolygon等.我想将图像作为背景提供给用户,以便他/她可以在背景图像的帮助下进行绘制,但是发生的事情是当用户在背景图像上进行绘制时,用户图像隐藏在背景图像的后面.
hi chritian,

Thanks for ur rly. what i am doing is i am drawing on panel control and i wrote my own code for that, function name ''RedrawMap" with code panel1.CreateGraphics.Drawline/DrawPolygon etc. I want to give image as background to user so that he/she can draw with the help of background image. But what is happening is when user draw on background image, users image hiding behind background image.


这篇关于在面板上的背景图像上绘制图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆