Results 1 to 5 of 5

Thread: DELPHI: Scrolling a TImage?

  1. #1

    Thread Starter
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253

    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

  2. #2
    Fanatic Member ALL's Avatar
    Join Date
    Jul 2004
    Location
    192.168.1.1
    Posts
    711

    Re: Scrolling a TImage?

    is this C/C++?
    Please support one of my projects?
    TKForums.com

    Web Forum
    JavaScript Wiki
    ________________________
    If somone helps you, please rate their post, by clicking the to rate their post

  3. #3
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190

    Re: Scrolling a TImage?

    Quote Originally Posted by ALL
    is this C/C++?


    I guess Delphi...

  4. #4

    Thread Starter
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253

    Re: DELPHI: Scrolling a TImage?

    yes, it is Delphi, but if anybody knows the VB i could translate i guess

  5. #5

    Thread Starter
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253

    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
  •  



Click Here to Expand Forum to Full Width