Mattias Gaertner wrote:
On Sun, 07 Aug 2005 18:40:05 +0200
Bartek <[EMAIL PROTECTED]> wrote:
[EMAIL PROTECTED] wrote:
what I'm doing wrong?
Try setting the visible property of the form to false.
done so: |||||||||||||
TCustomForm.ShowModal Visible=False Enabled=True fsModal=True
You are showing the form twice. Skip the second.
Mattias
But I don't show the form twice. At least I think so. I let Lazarus
auto-create the forms.
I close some of the unneeded forms manually.
[...]
procedure Tfrm_main.Form1Show(Sender: TObject);
begin
nc_prog_writer:=TNCWriter.Create;
Console.Show;
frm_progress.close;
frm_geo_properties.close;
frm_nccmd_param9.close;
frm_ncprog.show;
sdl_win:=tsdl_win_thread.Create;
caption:='DXF2MCR '+version;
left:=0;
top:=0;
end;
[...]
Then I try to show my form modal. I don't see where I show it twice.
Should I destroy and recreate the form before showing it modal?
[...]
begin
nc_prog_writer.Axyz(sdl_win.paper.current_file.geoitem[sdl_win.paper.cur_contact],sdl_win.paper.cur_contact);
frm_nccmd_param9.operateAxyz:=true;
frm_nccmd_param9.ed_x.text:=nc_prog_writer.x;
frm_nccmd_param9.ed_y.text:=nc_prog_writer.y;
frm_nccmd_param9.ed_z.text:=nc_prog_writer.z;
frm_nccmd_param9.Visible:=false;
frm_nccmd_param9.Close;
frm_nccmd_param9.ShowModal;
nc_prog_writer.werkzeugkorrektur_x:=frm_nccmd_param9.cb_vschub.text;
nc_prog_writer.werkzeugkorrektur_y:=frm_nccmd_param9.ed_wk_x.text;
nc_prog_writer.vorschub:=frm_nccmd_param9.ed_wk_y.text;
frm_ncprog.lb_ncprog.Items.Add(nc_prog_writer.Axyz(sdl_win.paper.current_file.geoitem[sdl_win.paper.cur_contact],sdl_win.paper.cur_contact));
end;
[...]
bartek
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives