将图片从盒子移到另一个盒子时一个奇怪的小问题 [英] A strange minor problem in moving a picture from a box to another
本文介绍了将图片从盒子移到另一个盒子时一个奇怪的小问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好. 我有以下简单的代码行:
Hey Guys. I am having this simple line of code:
Image1.Image = vImage.Image
Image1是子窗口中的图片框,而vImage是父窗口中的图片框.第一次打开子窗口时,在Image1中看到完整的空白图片,而同时vImage上有图片.当我 隐藏 并再次重新打开它时,上面有图片.有什么问题,如何在我的代码中解决?
Image1 is a picture box in child window and vImage is a picture box in parent window. When I open the child window for the first time, I see a complete blank picture in Image1 while at the same time vImage is having a picture on it. When I Hide and reopen it again It has the picture on it. What is the problem and how can I fix it in my Code?
谢谢
推荐答案
在该语句后添加Me.Refresh()
.
这将称为绘画事件"(隐藏和显示您的表单也是如此.
Add Me.Refresh()
after that statement.
This will call the Paint-events (so does hiding and showing your Form.
这篇关于将图片从盒子移到另一个盒子时一个奇怪的小问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文