I have a sub in a module for flipping pictures.
It normally works fine.
But I've added it to a project where it isn't working.
I tried copying the problem picturebox to a new project and it will work then.
The problem project is way too big to post here.
Any ideas on what could prevent the following sub from working?
VB Code:
Public Sub FlipImage(PicFrom As Object, picTo As Object) 'to place the new image over the old one just use the same obj for both paramiters Dim bAuto As Boolean Dim lScaleT As Long Dim lScaleF As Long On Error GoTo BadObject: lScaleT = picTo.ScaleMode picTo.ScaleMode = vbTwips lScaleF = PicFrom.ScaleMode PicFrom.ScaleMode = vbTwips bAuto = picTo.AutoRedraw picTo.AutoRedraw = True picTo.PaintPicture PicFrom.Picture, 0, PicFrom.Height, _ PicFrom.Width, -PicFrom.Height picTo.Picture = picTo.Image picTo.AutoRedraw = bAuto picTo.ScaleMode = lScaleT PicFrom.ScaleMode = lScaleF BadObject: End Sub




Reply With Quote