91
Generale / Re:Run Error (216) - General protection fault
« Ultimo post da petrusic il Aprile 02, 2024, 09:46:27 am »@petrusic
A me funziona.
Dove è che usi quel codice ? In un evento ? Quale ?
Io eseguo il create e l'emissione della mia Form dinamica dentro una routine.
Però, Udite, Udite: Ora ce l'ho fatta!
Ho inserito le righe enabled e visible nel codice del gruppo di istruzioni TForm.Create ed ha funzionato.
Codice: [Seleziona]
procedure AmmortamentoCespiti();
type
TtbGrupCespiti = array [0..10, 0..1] of string;
. . .
var
FormAvviso: TForm;
Lmsg: TLabel;
swFine: Boolean = False;
. . .
begin
. . .
FormAvviso:=TForm.Create(nil);
with FormAvviso do
begin
Height:= 130;
Left:= 500;
Top:= 50;
Width:= 400;
Position:= poScreenCenter;
Caption:= 'MOVIMENTI AMMORTIZZABILI';
Enabled:= True; <-- NUOVA
Visible:= True; <-- NUOVA
end;
Lmsg := TLabel.Create(FormAvviso);
with Lmsg do
begin
Parent:= FormAvviso;
Height:= 80;
Left:= 10;
Top:= 20;
Width:= 300;
Caption:= 'Ricerca in corso' + lineending + ' ' + lineending + Space(30) + ' A T T E N D I';
AutoSize:= False;
Enabled:= True;
Visible:= True;
ParentColor:= False;
end;
FormAvviso.Show;
Sleep(200);
Application.ProcessMessages;
Finalmente ho finito. Grazie.