Show vbModal, Me causes Stack Overflow... 
Author Message
 Show vbModal, Me causes Stack Overflow...

Dear all,

    I've used Show vbModal, Me in some situation... sometimes after
executing this many times... VB will give me a "Stack Overflow", sometimes
it even crashs VB, or terminate my VB without any error message...

    Can anyone help me? Thanks.

    BTW, what is the different between Show vbModal, Me and Show vbModal? I
can understand for Show vbModeless, [OwnerForm], but not Show vbModal,
[OwnerForm], thanks.

Pigeon.



Thu, 20 Jul 2000 03:00:00 GMT  
 Show vbModal, Me causes Stack Overflow...

Where is the Show vbmodal command is it in the form load event ??

Rich

Quote:

>Dear all,

>    I've used Show vbModal, Me in some situation... sometimes after
>executing this many times... VB will give me a "Stack Overflow", sometimes
>it even crashs VB, or terminate my VB without any error message...

>    Can anyone help me? Thanks.

>    BTW, what is the different between Show vbModal, Me and Show vbModal? I
>can understand for Show vbModeless, [OwnerForm], but not Show vbModal,
>[OwnerForm], thanks.

>Pigeon.



Thu, 20 Jul 2000 03:00:00 GMT  
 Show vbModal, Me causes Stack Overflow...

Quote:
>Where is the Show vbmodal command is it in the form load event ??

    No, I put the "form.Show vbModal, Me" for an action (Either button click
or double click on a listview)..

    Well... after a few times or unload the parent form and load it again...
it may give me that error...

Pigeon.



Fri, 21 Jul 2000 03:00:00 GMT  
 Show vbModal, Me causes Stack Overflow...

Show is method on a form.
When you write something like

Show vbModal, Me

VB interprets this like

Me.Show vbModal, Me

So you makes form owner of the itself.
This is a source of your problems, I think.

Ernest.



Quote:
> >Where is the Show vbmodal command is it in the form load event ??

>     No, I put the "form.Show vbModal, Me" for an action (Either button
click
> or double click on a listview)..

>     Well... after a few times or unload the parent form and load it
again...
> it may give me that error...

> Pigeon.



Fri, 21 Jul 2000 03:00:00 GMT  
 Show vbModal, Me causes Stack Overflow...

The source of your problem is the forms modality.

First, you cannot display a non-modal form from a modal form.

Second (and probably your problem) is a little confusing, so let me TRY To
explain.

If I have a form (I will call it Primary) shown Modal, and on that form, I
have a command button to display a second form, then the second form
(Secondary) must be shown Modal.  This is *Not* a problem.  The problem is
that the code on the original Primary Form has opened the secondary form,
so since the secondary form is currently open, the code module in the
Primary form is really still executing. Now, where you will crash, is If
somebody trys to Open or show the primary form again.  It really is already
loaded on the "Stack" so attempting to load it again Bombs miserably.

I hope I have not utterly confused you.  If you can make sense of the
paragraph above, I think it will help explain the issues.  I do not believe
you will find a solution while using Modal forms.  The way to fix it, is
not to use modal forms unless absolutely necessary.

If you would like more Info, or if you would like to continue this thread,
email me directly...

Greg Jackson
PDX, OR




Quote:
> Dear all,

>     I've used Show vbModal, Me in some situation... sometimes after
> executing this many times... VB will give me a "Stack Overflow",
sometimes
> it even crashs VB, or terminate my VB without any error message...

>     Can anyone help me? Thanks.

>     BTW, what is the different between Show vbModal, Me and Show vbModal?
I
> can understand for Show vbModeless, [OwnerForm], but not Show vbModal,
> [OwnerForm], thanks.

> Pigeon.



Fri, 21 Jul 2000 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Show vbModal, Me causes Stack Overflow...

2. Showing Form vbModal from sub causes 100% cpu utilization

3. User Control causes stack overflow

4. User Control causes stack overflow

5. vbmodal to vbmodal , not vbmodal to not vbmodal

6. VBModal causes illegal operation

7. vbModal appears not to work with .show method

8. Help Frm.show vbModal

9. Stack Overflow error message during Recalc

10. Stack Overflow

11. Error (Stack Overflow)

12. Stack Overflow Loading CR report from VB3

 

 
Powered by phpBB® Forum Software