Discussion:
Modal window not modal
(too old to reply)
vertuas
2007-11-06 17:04:25 UTC
Permalink
Hi All,

I have a tokbottomdlg window.

i have okbottomdlg.showmodel in a procedure that is assigned to the event
property of a thread object.

when a given value is passed from the thread, via the event the dialog is
displayed.

However the dialog window is not modal and i can click things on my main
form underneath. which causes the "modal" window to go to the back.

No if i close the dialog, the main from freezes as if there is a model
window open.

Can i not call showmodel from a procedure assigned to an even in a tthread
object?

Do i need to use synchronise from my thread?

Why does my model window not work?

thanks

Vert
Tom de Neef
2007-11-06 18:20:36 UTC
Permalink
Post by vertuas
Hi All,
I have a tokbottomdlg window.
i have okbottomdlg.showmodel in a procedure that is assigned to the event
property of a thread object.
when a given value is passed from the thread, via the event the dialog is
displayed.
However the dialog window is not modal and i can click things on my main
form underneath. which causes the "modal" window to go to the back.
No if i close the dialog, the main from freezes as if there is a model
window open.
Can i not call showmodel from a procedure assigned to an even in a
tthread object?
Do i need to use synchronise from my thread?
Why does my model window not work?
Check Help about `thread-safeĊ½. The VCL is not thread-safe. Any screen
interaction from a Tthread should be avoided. Your way out is via
Synchronize, placing the screen actions in the main thread.
Tom
vertuas
2007-11-06 19:27:13 UTC
Permalink
Post by Tom de Neef
Post by vertuas
Hi All,
I have a tokbottomdlg window.
i have okbottomdlg.showmodel in a procedure that is assigned to the event
property of a thread object.
when a given value is passed from the thread, via the event the dialog is
displayed.
However the dialog window is not modal and i can click things on my main
form underneath. which causes the "modal" window to go to the back.
No if i close the dialog, the main from freezes as if there is a model
window open.
Can i not call showmodel from a procedure assigned to an even in a
tthread object?
Do i need to use synchronise from my thread?
Why does my model window not work?
Check Help about `thread-safeĊ½. The VCL is not thread-safe. Any screen
interaction from a Tthread should be avoided. Your way out is via
Synchronize, placing the screen actions in the main thread.
Tom
Hi Tom

Thanks for that.

Indeed i did try using synchronize before i read your reply, everything
works properly now.

Cheers matey

Vertuas

Loading...