【VB6】清空Picture中图片的问题!
'PictureA1小,PictureA2大,PictureB用于显示A1或A2。PrivateSubCommand1_Click()'喷小图PictureB.ClsPi...
'PictureA1小,PictureA2大,PictureB用于显示A1或A2。
Private Sub Command1_Click()'喷小图
PictureB.Cls
PictureB.PaintPictureA1'小图
End Sub
Private Sub Command2_Click()'喷大图
PictureB.Cls
PictureB.PaintPictureA2'大图
End Sub
’为什么先喷大图后,再喷小图,会发现两个图叠加了起来?为什么PictureB.Cls没有起作用?
'我试过很多方法也不行?
'PictureB.Picture = Nothing
'PictureB.Picture = LoadPicture("")
呵呵,我是省略写了.
PictureB.PaintPictureA1,0,0,PictureA1.Width,PictureA1.Height
我试过了,能喷出图,但每次喷前都没有清空? 展开
Private Sub Command1_Click()'喷小图
PictureB.Cls
PictureB.PaintPictureA1'小图
End Sub
Private Sub Command2_Click()'喷大图
PictureB.Cls
PictureB.PaintPictureA2'大图
End Sub
’为什么先喷大图后,再喷小图,会发现两个图叠加了起来?为什么PictureB.Cls没有起作用?
'我试过很多方法也不行?
'PictureB.Picture = Nothing
'PictureB.Picture = LoadPicture("")
呵呵,我是省略写了.
PictureB.PaintPictureA1,0,0,PictureA1.Width,PictureA1.Height
我试过了,能喷出图,但每次喷前都没有清空? 展开
展开全部
Option Explicit
Private Sub Command1_Click()
Picture2.PaintPicture Picture1.Picture, 0, 0
End Sub
Private Sub Command2_Click()
Picture2.Cls '我也试了试,可以清空原来paint图啊,你的怎么不能清空?我这可以!
End Sub
'set picture2=nothing
'loadpicture("") 都可以清空,估计是你不小心哪里写错了,你再检查检查
Private Sub Command1_Click()
Picture2.PaintPicture Picture1.Picture, 0, 0
End Sub
Private Sub Command2_Click()
Picture2.Cls '我也试了试,可以清空原来paint图啊,你的怎么不能清空?我这可以!
End Sub
'set picture2=nothing
'loadpicture("") 都可以清空,估计是你不小心哪里写错了,你再检查检查
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询