This is ridiciolusly basic, but as im new to graphics programming, i have an excuse :)
I have searched the web, and here to find nothing for my needs.
Basically, it is different to load an image in Delphi, as to load most formats you need external libraries etc. However, i have been working on some code to deal with the many formats:
Now for some reason, i cant find a way to scroll the image.Code:procedure TfrmMain.mnuFileOpenClick(Sender: TObject);
var
OleGraphic: TOleGraphic;
fs: TFileStream;
begin
try
try
if dlgOpen.Execute = True then
begin
//Load the image
OleGraphic:= TOleGraphic.Create;
fs:= TFileStream.Create(dlgOpen.FileName, fmOpenRead or fmSharedenyNone);
OleGraphic.LoadFromStream(fs);
imgMain.Picture.Assign(OleGraphic);
//Update UI Information
stsMain.Panels[0].Text:= dlgOpen.FileName;
end;
finally
fs.Free;
OleGraphic.Free
end;
except on exception do
ShowMessage('Failed to load ' + dlgOpen.FileName);
end;
end;
Appreciate any solutions thanks
