Memory Error

G

Guest

using VB express, I have a form with 18 pictureboxes in that form, I load BMP
files into the pictureboxes, when I first run/debug the program it runs, then
I start getting memory errors, if I try and save it or run it again, anybody
know why this is?
Thanks,
Jerry
 
G

Guest

Each BMP=1.5 mb, the first error is insufficient memory to continue the
execution of the program, then the next is token endelement in state error
would result in an invalid xml document, then not enough storage available.
 
C

Cor Ligthert[MVP]

Jerry,

Without your code we cannot see much, probably for the VB code is a better
newsgroup


Cor
 
G

Guest

Cor Ligthert said:
Jerry,

Without your code we cannot see much, probably for the VB code is a better
newsgroup


Cor

Public Class form1
Dim picCount
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

Timer1.Interval = 1000
picCount = 0
Timer1.Enabled = True


End Sub

Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Timer1.Tick
Select Case picCount
Case 0

PictureBox1.Image = PictureBox1.Image
picCount = 1
Case 1

PictureBox1.Image = PictureBox2.Image
picCount = 2
Case 2

PictureBox1.Image = PictureBox3.Image
picCount = 3
Case 3

PictureBox1.Image = PictureBox4.Image
picCount = 4
Case 4

PictureBox1.Image = PictureBox5.Image
picCount = 5
Case 5

PictureBox1.Image = PictureBox6.Image
picCount = 6
Case 6

PictureBox1.Image = PictureBox7.Image
picCount = 7
Case 7

PictureBox1.Image = PictureBox8.Image
picCount = 8
Case 8

PictureBox1.Image = PictureBox9.Image
picCount = 9
Case 9

PictureBox1.Image = PictureBox10.Image
picCount = 10
Case 10

PictureBox1.Image = PictureBox12.Image
picCount = 11
Case 11

PictureBox1.Image = PictureBox13.Image
picCount = 12
Case 12

PictureBox1.Image = PictureBox14.Image
picCount = 13
Case 13

PictureBox1.Image = PictureBox15.Image
picCount = 14
Case 14

PictureBox1.Image = PictureBox16.Image
picCount = 15
Case 15

PictureBox1.Image = PictureBox17.Image
picCount = 16
Case 16

PictureBox1.Image = PictureBox18.Image
picCount = 17



'if you want it to start over change piccount = 0 vice 17
End Select
End Sub


Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs)

End Sub
End Class
 
C

Cor Ligthert[MVP]

Jerry,

I don't see any error in the code, however I assume that it takes some
times. Mostly it helps in these cases to set your timer to disabled when you
start the case select and to enable it again at the end, can you try that?

You know that especially for the "case select" the newsgroup

is probably a better place.

Cor
 
G

Guest

What I noticed is that when it error out, it would not allow me to save my
program, so bmps loaded into picturebox 9 - 18 did not save into program, so
I tried to put the bmp's into the pictureboxes and build it thats when I get
the error, as if too many pictures?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top