Ver Mensaje Individual
  #15  
Antiguo 29-03-2023
giantonti1801 giantonti1801 is offline
Miembro
 
Registrado: oct 2022
Posts: 143
Reputación: 2
giantonti1801 Va por buen camino
Cita:
Empezado por duilioisola Ver Mensaje
¿En qué punto exactamente?
Pon tu código real para poder ver qué estás haciendo.
Un "Access Violation" suele ser una llamada a un objeto que no está creado. Seguramente estás liberanto antes de tiempo un objeto o lo estás utilizando antes de crearlo.


Lo mismo de antes... pon tu código real ya que caFree es un tipo definido en los formularios en la unidad Forms.

Código Delphi [-]
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
  inherited;
  Action := caFree;
end;

De la ayuda de Delphi 6:
Ya se quito el error en Action:=caFree;
Código Delphi [-]
procedure TFormPacienteNew.FormClose(Sender: TObject; var Action: TCloseAction);
begin
  inherited;
  Action := caFree;
  end;
el error se quito cuando coloque esta linea en Type
Código Delphi [-]
type
  TCloseAction = (caNone, caHide, caFree, caMinimize);  //<--esta linea quito el error
  TFormPacienteNew = class(TForm)
    Layout17: TLayout;
    Label153: TLabel;
    TMSFMXEdit13: TTMSFMXEdit;
    ShadowEffect244: TShadowEffect;
    Label154: TLabel;
    TMSFMXEdit14: TTMSFMXEdit;
    ShadowEffect258: TShadowEffect;
    Label156: TLabel;
    TMSFMXEdit15: TTMSFMXEdit;
    ShadowEffect262: TShadowEffect;
    Label158: TLabel;
    Label159: TLabel;
    TMSFMXEdit16: TTMSFMXEdit;
    ShadowEffect265: TShadowEffect;
    Label160: TLabel;
    Label161: TLabel;
    Label177: TLabel;
    Label192: TLabel;
    TMSFMXEdit17: TTMSFMXEdit;
pero ahora cuando cierro la ventada
Código Delphi [-]
procedure TFormPacienteNew.TMSFNCButton1Click(Sender: TObject);
begin
FormPacienteNew.Close;
end;
me sale un Mensaje 'Invalid Piont operation' y otro que dice 'Invalid Argument'
los formulario se abren asi:
Código Delphi [-]
procedure TFormInicio.TMSFMXToolBarButton2Click(Sender: TObject);
begin
FormPacienteNew := TFormPacienteNew.Create(Self);
    try
    FormPacienteNew.ShowModal;
    finally
    FormPacienteNew.Free;
    end;
end;
Responder Con Cita