When I run my code from VB I don't get this problem, but when I try to run the .exe I get an error that says "Can't show non modal form when modal form is displayed". I don't have anything set to non modal or modal. Can anyone help me?
Check all your .Show commands. If any one of them has a .show 1 then you are displying a form modally i.e. execution stops until the displayed form is hidden. Specifically the error occurs when a form which has been displayed modally tries to load or Show a non-modal form (default). If that is not your problem then search MSDN.
A MSGOX can not cause the problem unless MSGBOX itself tries to display a non-modal form. Execution of your program is stopped until the MSGBOX, being modal, goes away so SHOW ing a modal form yourself can't cause a problem unles YOU are in a modal form.
I think you may be trying to show a form in a webbrowser event (or a routine that is called from the event). These events can be triggered even if a modal form is displayed.
recompile the program, and run it again. OutputDebugString is like debug.print, except it works in .EXE's, so it's useful for tracking errors of this nature.
the declaration in a .BAS module is this:
Public Declare Sub OutputDebugString lib "kernel32" Alias "OutputDebugStringA" (byval lpszDebugString as String)
and the syntax is this:
OutputDebugString "This is a debug string"
Add those to where you think the problem might be, recompile, and watch the output. When you get the error, check for the last line sent to debugview, and work from there.
hmm that sounds preety weird to me.
Can you find out on your code where it's breaking? And maybe post here the part of that code so we can have a look at it.
Something must be wrong with it I think. The obvious answer to your problem would be a modal form that wasn't being hidden/closed trying to load another form, but you said thats not your case. So maybe if we could have a look at that part of the code we could find out something.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.