设窗体上有3个图像框:Image1、Image2、Image3,并有下面的程序代码: Private Sub Form_Load() Image1.Picture = LoadPicture("LEAF.bmp") Image2.Pictu

admin2015-08-28  20

问题 设窗体上有3个图像框:Image1、Image2、Image3,并有下面的程序代码:
Private Sub Form_Load()
    Image1.Picture = LoadPicture("LEAF.bmp")
    Image2.Picture = LoadPicture("OPEN.bmp")
    Image3.Visible = False
End Sub
Private Sub Image1_Click()
    Image2.Picture = Image1.Picture
End Sub
Private Sub Image2_Click()
    Image3.Picture = Image2.Picture
    Image2.Picture = Image1.Picture
    Image1.Picture = Image3.Picture
End Sub
在程序运行期间单击Image2,则在窗体上看到的结果是

选项 A、在Image3中显示Image2中的图片
B、Image1、Image2中原有图片被交换了
C、Image1、Image2中都是原来Imege1中的图片
D、Image1、Image2中都是原来Imege2中的图片

答案B

解析 Form_Load过程中在图相框里载入相应图片。点击Image2时,激发Image2_Click事件,在事件中图片进行了交换。选B)。
转载请注明原文地址:https://kaotiyun.com/show/XzLp777K
0

最新回复(0)