Solved

"Can't show non-modal form when modal..." vs Windows 2000

Posted on 2002-07-11
5
431 Views
Last Modified: 2012-05-04
I've written a VB6 program and it is installed on 35 various workstations.

I'm getting error 401 "Can't show non-modal form when modal form is displayed" in a couple of places, on two Window 2000 (Sp2) machines with the latest Windows updates ran on them. However, this error never occurs on the Windows98 & NT4 workstations. And also doesn't occur on 5 other Windows 2000 workstations (Sp2) that haven't had the Windows updates run.

Also on these two machines modal forms sometimes open frozen (as if Form.Enabled = False) where clicking on them does nothing but Escape/Alt+F4 do close the form.

I think the error could possibly be linked to a modal form that's hidden, but why work on the other 33 machines???

Assistance would be much appreciated
0
Comment
Question by:RobertEnglish
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 1

Expert Comment

by:PX
ID: 7145561
Hi,

This is something in ur code which one modal form is there and then the code want another modal form to display. to solve this problem, u must make sure that in ur code, there are no functions to call another modal form before u close the previous one. MODAL FORM ARE ALWAYS VISIBLE, so, there is no invisible possibility.

And this is not a problem of what version of windows (at least win32), or service pack.


PX
0
 
LVL 6

Expert Comment

by:MELeBlanc
ID: 7145917
Before we throw out the idea that it is not the OS...

Can you make the app freeze consistently on those W2K machines that are patched?  And if you use that same scenario that freezes it there.. when you perform these exact steps on an unpatched machine, does it not seize up/give errors?

-M
0
 
LVL 18

Expert Comment

by:mdougan
ID: 7146035
Often, in consistent behaviors between different OS or between different machines on the same OS are the result of a "timing" issue.  Not all event fire synchronosly.  It's possible on two different computers that on one computer the code executes a form load, and while that form is loading some other event code fires.  While, on another computer, the form might load so quickly that the other event fires after the form loads.

The behavior points to the likelyhood that you are not managing your forms properly.  The most common mistake is referencing properties or controls on a form that was not currently loaded.  In some cases, this will cause the form to be loaded, but not be visible.  You generally know when this is happening, because you close your main window and your application keeps running.  This happens a lot when people cut and paste code from one form to another.  Their might have been form name references in the code that was copied that never got changed.

Modal forms are another matter.  The only want to get a form to be modal is to explicitly show it as modal.  It should be fairly easy to search for all instances where you are showing a form modally, and then look within the code for that form and see if there are any instances where you are show another form.
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 8002322
Hi RobertEnglish,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Save as PAQ -- No Refund.

RobertEnglish, Please DO NOT accept this comment as an answer.
EXPERTS: Post a comment if you are certain that an expert deserves credit.  Explain why.
==========
DanRollins -- EE database cleanup volunteer
0
 

Accepted Solution

by:
SpideyMod earned 0 total points
ID: 8095325
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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…

696 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