I'm having some trouble understanding "modality"
Example: I have an app with three forms: FORM1, FORM2, FORM3.
An action on FORM1 causes me to do this:
TempLong = FORM2_SHOW(HWND_FORM1, %True)
At that point, FORM2 is displayed, and I can't do anything on FORM1
Now if something on FORM2 causes this:
TempLong2 = FORM3_SHOW(HWND_FORM2, %True)
I get FORM3 displayed. I can't do anything on FORM2, but now all the controls on FROM1 will accept input. The condition is reversed if I change the code to
FROM3_SHOW(HWND_FORM1, %TRUE)
My objective is to open the form and have the system only respond to that form, ignoring activity on all others.
Using PB/Win 8.04 & FF2.86
Any pointers appreciated.
Quote
...but now all the controls on FROM1 will accept input
I think you must be doing something more than you're saying in your post. I just created a simple three form project and followed your instructions. The modality worked as expected. Only the active form could receive focus/input. I have never seen the behaviour that you're saying.
Maybe you should send me your project to see if I can spot what is going wrong. Are you somehow modifying the window handles being stored in HWND_FORM1, HWND_FORM2 or HWND_FORM3 ??
I'll admit to the strangeness -- as I experimented more today I couldn't duplicate the problem. Then, later on, it came back once, meaning that I saw the condition, closed form2 and form3, then later on opened them up again & everything behaved (this was without shutting down the program). The interesting thing was that although form1 accepted input, it would not come the "front" -- it stayed behind form2 and form3.
I can send you the project files, but it might be tough for you to run it -- it requires DDOC & SQLTools, and the 20GB+ database :-\
I do have a couple of timers on form1, that fire every few minutes and update controls on form1. could that be part of it? I'm also not ruling out some kind of wonkiness on Window's part either (Windows XP/SP3, dual monitors on an nVidia card)
Maybe I'll try to reproduce it with a simpler project and see. Given that the problem is intermittent, I'm not sure how much energy I want to expend to chase it down.