Memory Error

Memory Error

am 27.09.2007 21:29:00 von Jerry

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

RE: Memory Error

am 27.09.2007 23:02:03 von Jerry

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.

"Jerry" wrote:

> 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

Re: Memory Error

am 28.09.2007 06:58:53 von notmyfirstname

Jerry,

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

news:\\microsoft.public.dotnet.languages.vb

Cor

Re: Memory Error

am 29.09.2007 04:15:00 von Jerry

"Cor Ligthert[MVP]" wrote:

> Jerry,
>
> Without your code we cannot see much, probably for the VB code is a better
> newsgroup
>
> news:\\microsoft.public.dotnet.languages.vb
>
> 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

Re: Memory Error

am 29.09.2007 12:25:29 von notmyfirstname

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

news:\\microsoft.public.dotnet.languages.vb is probably a better place.

Cor

Re: Memory Error

am 30.09.2007 17:58:00 von Jerry

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?

"Cor Ligthert[MVP]" wrote:

> 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
>
> news:\\microsoft.public.dotnet.languages.vb is probably a better place.
>
> Cor
>