图像不显示第一次c#win。形成 [英] Image Not Displaying at first Time c# win. form

查看:71
本文介绍了图像不显示第一次c#win。形成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 ImageLocation 将图像设置为图片框,但有时首次显示未知图像符号但在再次设置后会正确显示图像。如何在第一时间正确显示图像?







有替代< b> ImageLocation (我试图通过PictureBox.Image =地方设置)但是效果不好





我用它就像这个



I am using ImageLocation to set image to picturebox but sometimes at first time it shows unknown image sign but after setting it again it shows the image correctly. How to display the image correctly at the first time?

and

is there an alternate to ImageLocation (i tried to set through PictureBox.Image= place) but didn't work well


I used it like This

picItem.ImageLocation = @"D:/Image1.jpg"

推荐答案

试试这个。



try this.

picItem.Image = Image.FromFile("D:/Image1.jpg");


试试这个:



C#中的图片框 [ ^ ]



希望它有所帮助:)
Try this:

PictureBox in C#[^]

hope it helps :)


试试用于图片框:



***

#*#

看到这个

选项1

选项2

选项3
Try this for picture box:

***
#*#
see this
option 1
option 2
option 3


这篇关于图像不显示第一次c#win。形成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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