Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Maximum Picture Box Size

Status
Not open for further replies.

Error7

Programmer
Jul 5, 2002
656
GB
I assume the maximum height and width of a picture box is double the screen size. If I go above that I get an error 480. "Can't Create AutoRedraw Image".

Can anybody confirm this please.

[gray]Experience is something you don't get until just after you need it.[/gray]
 

Well with this code I do not get an error...
[tt]
Option Explicit

Private Sub Form_Load()
Picture1.Width = (Screen.Width * 3)
Picture1.Height = (Screen.Height * 3)
Picture1.AutoRedraw = True
End Sub
[/tt]
then again I am not loading a picture into the box. It may be how your graphics card is able to handle the memory???

Good Luck

 
Thanks for the input.

I tested some sample code, as your example, without loading an image and yes, I got up to * 5 without error.

So I used the same sample code and loaded an image. No problem.

Then realised, (sorry I should have mentioned it in my original thread) that I'm using PaintPicture.

Using a loop, I load first image into Picture2 then PaintPicture to Picture1. Move x y coordinates then repeat until end of loop.

I think it's the PaintPicture method that is creating the error.

Thanks for your help.


[gray]Experience is something you don't get until just after you need it.[/gray]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top