Being a complete beginner, I just answered the first question ( Delphi: TImage.Create causes an access violation ) to immediately fix a new problem:
procedure TSelectorForm.FormCreate(Sender: TObject); var Loop: Byte; begin for Loop := 1 to 10 do begin ArrayOfImages[Loop] := TImage.Create(SelectorForm); MainForm.MyImageList.GetBitmap(Loop - 1, ArrayOfImages[Loop].Picture.Bitmap); ArrayOfImages[Loop].Top := ... ArrayOfImages[Loop].Left := ... ArrayOfImages[Loop].Enabled := True; ArrayOfImages[Loop].Visible := True; end; end;
When I show this form
procedure TMainForm.MyImageClick(Sender: TObject); begin SelectorForm.Visible := True; end;
Images are not visible. What am I doing wrong?
I want to thank everyone for their advice. I hope asking elementary questions will help others avoid them in the future :-)
source share