|
-
Jun 19th, 2005, 01:04 PM
#1
Thread Starter
Supreme User
Scrolling a TImage?
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:
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;
Now for some reason, i cant find a way to scroll the image.
Appreciate any solutions thanks
-
Jun 19th, 2005, 03:15 PM
#2
Fanatic Member
-
Jun 19th, 2005, 03:16 PM
#3
Re: Scrolling a TImage?
 Originally Posted by ALL
is this C/C++?
I guess Delphi...
-
Jun 19th, 2005, 04:33 PM
#4
Thread Starter
Supreme User
Re: DELPHI: Scrolling a TImage?
yes, it is Delphi, but if anybody knows the VB i could translate i guess
-
Jun 29th, 2005, 11:13 AM
#5
Thread Starter
Supreme User
Re: DELPHI: Scrolling a TImage?
...This is why i said this General Developer Forum is a waste of time, you never get the answers you need
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|