borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (Is It Possible)Next Topic (Multidimensional Arrays) New Topic New Poll Post Reply
AndreaVB Forum : VB General : Run-time error '7'
Poster Message
Goran
Level: Moderator

Registered: 16-05-2002
Posts: 1681

icon Run-time error '7'  Archived to Disk

Hi, I need some help here. I have some errors in my program that I cannot solve. Let me explain. I think the problem is with two forms. On one I do the dwawings in 30 picture boxes size 500x2000 and I do it with API's like : SetPixel, LineTo, Ellipse, Rectangle, ExtFloodFill and other basic API's. All of them have AutoRedraw=true. On the other form I have preview of the jpeg images like thumbnails in IE in WinXP. Every pic box is same size, so I am using paint picture method to resize them. I do this by another pic box (visible=false,autosize=true). All of these pic boxes have AutoRedraw=true. Now the problem. ) This program works fine in winXP, but when it is installed in Win98, I get this two error msg: run-time error '7' (out of memory) and run-time error '480' Can't create AutoRedraw image. I realised that they are connected. I installed VB on Win98, but when I tried to debug it, I  couldnt get in the code (I guess cause I am without memory ). Then Win98 slows down, refreshing almost doesnt exists. I installed program to trace on RAM memory, but when this happened I had 170 Mb free RAM memory. Which is this memory that I am out of? How can I "free" it? Can anyone help me? I repeat program doesn't have this errors in WinXP!

____________________________
If you find the answer helpful, please mark this topic as solved.

06-07-2002 at 03:40 PM
View Profile Send Email to User Show All Posts | Quote Reply
JLRodgers
Level: Moderator

Registered: 04-04-2002
Posts: 1617
icon Re: Run-time error '7'  Archived to Disk

The source code not even loading in VB on the 98 machine is interesting (since the VB files are just "text" files capable of being edited in notepad).

The only time I've ever seen a problem with the source code not loading is when: 1)a control in the program doesn't exist on the computer, 2) a DLL doesn't exist on the computer that's referenced by the code.

Since you said you just used the normal API's and picture boxes, there shouldn't be a problem. Unless you have a service pack installed on the XP machine for VB and not on the 98 machine.

06-07-2002 at 04:12 PM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
Goran
Level: Moderator

Registered: 16-05-2002
Posts: 1681
icon Re: Run-time error '7'  Archived to Disk

You have misunderstood me. I have VB installed on XP and I do all the programing there. I compiled program, made setup, installed it on XP and it worked fine. I installed it on 98 and when I move from one record to another in base (every record has different drawings and images), at first it pic boxes are not 'refreshing' enough (every time I move to another record less lines are drawn), the system is slowing down, and msg error pops up err '7' and error 480. So I came up with the idea to install VB on 98 and see what went wrong. So I installed it, started uncompiled project, and then after moving pointer through base (as I said every time I move pointer to base picures are redrawn, jpeg's are loaded, but not in the same time). But in both cases, I get this error msg's, and I get the usual VB windows when bug comes out. When I click to debug, I cannot get in the code to see where the bug is (in case of error '7', I guess because I am out of memory)), but in case of error '480' I can and the error is in the line
picThumb(inX).PaintPicture picOrigin.Image, 0, 0, picThumb(inX).ScaleWidth,
picThumb(inX).ScaleHeight, 0, 0, picOrigin.ScaleWidth, picOrigin.ScaleHeight
, where picThumb is member of array pic boxes, and picOrigin is the pic box where real-size jpeg is loaded. I repeat, this code works fine when first couple of times jpeg's are loaded, but after that error pops up. After that windows doesnt function normaly( i.e. When error '7' pops up and I dont close the message, but click on Start button, nothing happends, but when I mobe mouse up, options begin to apear-ShutDown, Run.....). When I close error msg, program terminates, but windows continue to work slowly, until it is restarted (for instance, now I cannot copy files and listen to music at the same time and I have Duron 750 MHz, 256 Mb SDRAM). But program works OK on XP. I am begining to suspect that kernel memory is the issue here

____________________________
If you find the answer helpful, please mark this topic as solved.

06-07-2002 at 08:57 PM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : VB General : Run-time error '7'
Previous Topic (Is It Possible)Next Topic (Multidimensional Arrays) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder