I have an existing program (very large) which I would like to have a “Please wait” modal appear when certain pages are shown.
I have tried everything I can think of.
if you put modal1.show in the SHOWN even it wont show, not sure why.
If you put modal1.show in the OPEN event then it wont show as the webpage isn’t shown yet.
It doesn’t work if you call it from the previous window or button on the previous page.
I have tried timers etc…
I like the modal due to it locking the user from “clicking randomly” and the way it appears on the screen.
Once I am in the page I am fine and can use the modal1.show from the mouseDOWN and mouseUP events
Fwiw, the reason you are having trouble is that the framework queues up commands and sends them all at once. So if you show a dialog and do a bunch of other stuff and then close the dialog, the end result is that the dialog never shows.
You can solve some of this by showing a dialog and then starting a WebThread from which you push changes out to the page and then hide the dialog when that process completes.
Hi Michel,
Tried that and it doesn’t work.
Well that isn’t exactly true, since the page itself isn’t shown the modal cannot be seen.
It is actually being shown but it isn’t visible.
I know this because if you put a button on the web page and try to SHOW the modal then nothing shows.
If you have another button to hide the modal and press it first and then the show button then the modal will show.
I would expect this to be an “undocumented feature”
Yes - I understand why it happens.
Was hoping there would be some “super smart” way of doing it easily.
Having to make 100+ threads for 100+ shown events of the pages will take a while.
[quote=259953:@damon pillinger]Hi Michel,
Tried that and it doesn’t work.
Well that isn’t exactly true, since the page itself isn’t shown the modal cannot be seen.
It is actually being shown but it isn’t visible.
I know this because if you put a button on the web page and try to SHOW the modal then nothing shows.
If you have another button to hide the modal and press it first and then the show button then the modal will show.
I would expect this to be an “undocumented feature”
[/quote]
You do not understand. I tested before suggesting. For all intents and purposes, the modal IS a web page. It can be displayed at any time BEFORE a web page. But because it is modal, it always displays on top. So when you show a web page, it goes behind.
In session :
Sub Open()
dim m as new modal1
m.show
End Sub
If you want to display a new page with the dialog on top, do in a button :
Sub Action()
dim m as new modal1
m.show
webpage2.show
End Sub
I have a modal that has a helper method that shows a spinner while doing processing. I then have a helper to call it with any method:
DoProcesses(AddressOf ReloadQuery)
The helper method is in a Global Module:
Sub DoProcesses(ParamArray Processes() as WDProcessing.BlankDelegate)
Session.Pause = true
dim wd as new WDProcessing
wd.Processes = Processes
wd.Show
End Sub