图片框 [英] PictureBox

查看:54
本文介绍了图片框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这应该很简单,当我使用代码时:

PictureBox1.Image = Image.FromFile(" MyPic.jpg")


how我是否卸载它可以移动或删除它吗?


非常感谢agian,

Sueffel

This should be simple, when I use the code:
PictureBox1.Image = Image.FromFile("MyPic.jpg")

how do I "unload" it so I can move or delete it?

Thanks yet agian,
Sueffel

推荐答案

试试这个:


PictureBox1.Image = Nothing


它将清除图像。

Sueffel写道:
Try this:

PictureBox1.Image = Nothing

It will clear the image.

Sueffel wrote:
这应该很简单,当我使用代码时:
PictureBox1.Image = Image.FromFile(" MyPic.jpg")

我如何卸载它可以移动或删除吗?

非常感谢agian,
Sueffel
This should be simple, when I use the code:
PictureBox1.Image = Image.FromFile("MyPic.jpg")

how do I "unload" it so I can move or delete it?

Thanks yet agian,
Sueffel



试试这个:


PictureBox1.Image =没什么


它会清除图像。


Sueffel写道:
Try this:

PictureBox1.Image = Nothing

It will clear the image.

Sueffel wrote:
这应该很简单,当我使用代码时:
PictureBox1.Image = Image.FromFile(" MyPic.jpg")

怎么做我卸载它可以移动或删除吗?

非常感谢agian,
Sueffel
This should be simple, when I use the code:
PictureBox1.Image = Image.FromFile("MyPic.jpg")

how do I "unload" it so I can move or delete it?

Thanks yet agian,
Sueffel



那个它会的,我同意。这也是我第一次尝试,但是,

windows仍然使用该文件,直到我关闭程序。它必须是图片框,没有别的东西搞乱那个图像,如果我不是b $ b加载它,那就没关系了。我怀疑它可能与

可怕的GC有关(我发现越来越多的理由不喜欢它),但我不是

专家。


谢谢,

Sueffel


" yEaH rIgHt" <无****** @ haha​​.com>在消息中写道

新闻:10 ************* @ corp.supernews.com ...
That it will, I agree. It is also the first I tried incidently, but,
windows still has the file in use until I shut down the program. It has to
be the picturebox, nothing else is messing with that image, and if I don''t
load it, things are fine. I suspect it may have something to do with the
dreaded GC (I''m finding more and more reasons not to like it), but I''m not
an expert.

Thanks,
Sueffel

"yEaH rIgHt" <no******@haha.com> wrote in message
news:10*************@corp.supernews.com...
试试这个:

PictureBox1.Image = Nothing

它将清除图像。

Sueffel写道:
Try this:

PictureBox1.Image = Nothing

It will clear the image.

Sueffel wrote:
这应该很简单,当我使用代码:
PictureBox1.Image = Image.FromFile(" MyPic.jpg")

如何卸载它可以移动或删除吗?

非常感谢agian,
Sueffel
This should be simple, when I use the code:
PictureBox1.Image = Image.FromFile("MyPic.jpg")

how do I "unload" it so I can move or delete it?

Thanks yet agian,
Sueffel



这篇关于图片框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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