Solved

run time error 401 -- cant show non-modal form while a modal form is display

Posted on 2001-07-24
5
1,261 Views
Last Modified: 2012-06-27
i got a run time error 401 -- cant show non-modal form while a modal form is display

the error fired when a msgbox loaded with deafult parameters and another form is activate and includes a timer control

this error occurs only in 1 computer  while another 5 computers works fine.

the environment is:
win-95
vb-6 SP3


0
Comment
Question by:adl
  • 3
5 Comments
 
LVL 27

Expert Comment

by:Ark
Comment Utility
Can you provide code?

Cheers
0
 
LVL 4

Accepted Solution

by:
vindevogel earned 100 total points
Comment Utility
You've got your form as a modal form (form.show vbModal)
In that form, you want to display another messagebox ...

That's not allowed by Windows.


You must either show your form not modal and then popup the messagebox.

But, I guess that you put it modal to ensure that the user clicks one of the buttons on the form ....
You'll have to check that off with a global variable (that is changed when the user clicks one of the buttons) and you can put your form "always on top" to simulate the modal effect.  There's enough code on this site on how to display a form always on top.
0
 

Author Comment

by:adl
Comment Utility
thanks for the comments but
i dont have any modal forms

also on other computers tested i dont have this problem
0
 
LVL 4

Expert Comment

by:vindevogel
Comment Utility
run time error 401 -- cant show non-modal form while a modal form is display

with no modal forms, this is a curious run time error.
0
 
LVL 4

Expert Comment

by:vindevogel
Comment Utility
Why did you grade this C ?
I consider this a blame on my record !
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now