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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB5 CAUSED AN INVALID PAGE FAULT

Status
Not open for further replies.

MrVB50au

Programmer
Mar 16, 2003
326
AU
Could someone please help me.

I've been trying to workout why when I press the [ ok ]button or the [ Cancel ] button to close 'frmOptions' form that I get the follow message:
-----------------------------------------------------------
VB5 caused an invalid page fault in
module VB5.EXE at 0167:00443e9e.
Registers:
EAX=00f8e818 CS=0167 EIP=00443e9e EFLGS=00010206
EBX=00f9dc34 SS=016f ESP=007fdbf0 EBP=007fdcb4
ECX=00f9dc34 DS=016f ESI=00f9dc34 FS=6a9f
EDX=005835e0 ES=016f EDI=0000105c GS=0000
Bytes at CS:EIP:
8b 48 2c 8b 41 1c a9 00 00 0c 00 74 04 5e c2 08
Stack dump:
00f5549c 0041a4f0 00f9dc34 00000000 00000000 00f9dc34 0000105c 02760000 00000000 027636e8 7de81da9 027636e8 0272abb5 027636e8 7de811dc 00000018
------------------------------------------------------------
Here's what I have in both procedures:

Private Sub btnCancel_Click()
Unload Me
End Sub

Private Sub btnOK_Click()
Unload Me
End Sub

------------------------------------------------------------
Has it to do with the fact that there maybe too many procedures in the 'frmOptions' module (too much code)?

Any help in this would be appriciated greatly.

Thank you for your time,

Andrew G.
 
It may be that one of the controls on the form has become corrupt or there's an incompatability between the .frm and .frx files. What you could try doing is stripping the form completely and leaving the code in the background and save the form. Then try building it up bit by bit starting with the two command buttons and then executing it to see how it goes.


Mark

The key to immortality is to make a big impression in this life!!
 
Your thread implies that you have a Form called 'frmOptions' and a Module called 'frmOptions'.
Is this correct?

Is 'frmOptions' your start up Form?

If so have you unloaded all other Forms in your app?

Big Al
 
bigalbigal

I have even made the 'frmOptions' form the startup for so I could work on the problem. I've gone right through the code using the step wise facility and there are no other references to outside forms or other modules. The module that I refered to was the code that belongs to 'frmOptions' NOT another module named 'frmOptions' that's outside of the actual FORM 'frmOptions'.

Thank you again,

Andrew G.
 
Spellman

I have commented all calls to other procedures within the 'frmOptions' Form_Load event and even when I click on the cross button (close) on the 'frmOptions' Form, it still does the same thing.

Andrew G.

 
I don't think it has anything to do with your code. What I mean is to strip the form of all the controls on the front end and then save it and then just put them back on bit by bit making sure to leave all the code and rename the controls exactly as they are currently named.

Mark

The key to immortality is to make a big impression in this life!!
 
Spellman

You know what? I think you're right because I had retrieved the older version of 'frmOptions' called: 'frmBorderOptions' in which it had the old SSTabStrip control that I used and told the program to open that one and then I closed it as I did with the other one and it didn't give me an error at all.

There's a lot of controls in the 'frmOptions' form so I think what I'll do is just try and configure the older version and rename that if all goes wrong.

However, I will do as you suggested and first remove all the controls on 'frmOptions' and rename it as 'frmOpt' and slowly but carefully add each control.

There is another thing though, but I don't think it's that. I created my own ActiveX control buttons but I also have them on the older version 'frmBorderOptions' form and seems to be working just fine.

But I will do as you suggested.

Thanks, I'll get back to you to let you know how it's progressing.

Andrew G.
 
Hi Andrew,

Something to try... when you copied (if I understand you explaination) the old frmOptions.frm to your program to continue working on it you should also copy/paste a file called frmOptions.frx

This may solve your issue.

 
I havn't copied any form, I created a new form. The older version was named 'frmBorderOptions' that works but I discarded this due to that you can't customize the SSTabStrip without doing a whole lot of API calls.

It was much easier to place SSPanel controls on a form and placing my 'PictureButton' ActiveX controls above each one.

I could then do whatever I wanted to and it worked great with beautiful looking buttons that match the background texture of the form and SSPanels.

Imagine this ok? Nomore bordering looking dialog boxes and the user can choose from up to 100 textures and the buttons update to match. Sounds Good huh? But just recently I had this stupid message come up that really got me irrated.

Thanks for your suggestion but that I had also thought of.

Thanks for your time.

 
OK, I created a newer version of the frmOptions form and it's all working great. I think sometimes vb or windows itself currupts files or you may have done something at a particular point in the memory address that causes the stupid this to give an invalid page fault.

After saying all that, let me just say thanks to all you guys and gals for all your help. it's been working great thanks to all of your suggestion.

Andrew G.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top