View Issue Details

IDProjectCategoryView StatusLast Update
0003315JEDI VCL00 JVCL Componentspublic2005-11-22 09:23
ReporterMauricio VargasAssigned Toobones 
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionno change required 
Product Version3.00 
Target VersionFixed in Version 
Summary0003315: Problem showing other forms in jvThread
DescriptionWhen you are running a Thread from a jvThread componente, and want to show modal one form in the onExecute event of the thread, it crashes with the message "canvas does not allow to draw".

procedure TForm1.TareaExecute(Sender: TObject; Params: Pointer);
begin
        var_i := 0;
        repeat
             label1.caption := formatDateTime('hh:mm:ss:zz', now);
             label1.update;
             if var_i = 100000 then
             Begin
                  Application.CreateForm(TForm2, Form2);
                  form2.showModal;
             End;
             inc(var_i);
        until tarea.terminated;
end;
TagsNo tags attached.

Activities

2005-11-16 15:15

 

Error_jvThread_ShowModal.zip (4,360 bytes)

jfudickar

2005-11-18 04:02

developer   ~0008096

This is a principle problem of the threads.

You must call the showModal with the synchronize function of the thread.

Look at the synchmessagedlg function inside the thread. This could be a sample, how to handle this.

Greetings
Jens

obones

2005-11-22 09:23

administrator   ~0008143

Please read thoroughly the chapter on threads in the VCL help.

Issue History

Date Modified Username Field Change
2005-11-16 15:15 Mauricio Vargas New Issue
2005-11-16 15:15 Mauricio Vargas File Added: Error_jvThread_ShowModal.zip
2005-11-18 04:02 jfudickar Note Added: 0008096
2005-11-22 09:23 obones Status new => resolved
2005-11-22 09:23 obones Resolution open => no change required
2005-11-22 09:23 obones Assigned To => obones
2005-11-22 09:23 obones Note Added: 0008143