Hi,
I have shifted the origin of a picturebox and changed its extents using the following statements:
Call SetViewportOrgEx(PictureBox1.hDC,100, ViewExtY-100, ViewOrgOld)
Call SetMapMode(PictureBox1.hDC, MM_ANISOTROPIC)
Call SetWindowExtEx(PictureBox1.hDC, WinExtX, WinExtY, WinExtOld)
Call SetViewportExtEx(PictureBox1.hDC, ViewExtX, -ViewExtY, ViewExtOld)
where,
ViewExtX, ViewExtY are viewport (PictureBox) X and Y extents.
WinExtX, winExtY are Window X and Y extents
so that, the new origin is at (100,100) from the bottom left.
The problem is that when refreshing the picturebox (with new origin and extents) by .Refresh or .Cls, the part of the picturebox on the left and bottom of the new +ve axes is not refreshing. It looks as if -ve part is not getting painted.
I dont want to refresh the picturebox by again setting origin back to (0,0) as it causes more flicker.
I need the full picturebox to be refreshed.
Any help will be much appreciated.
Thanks,
Rohit


