Results 1 to 4 of 4

Thread: Scrolling an image ???

  1. #1

    Thread Starter
    Junior Member Cadejos's Avatar
    Join Date
    Dec 2000
    Location
    Costa Rica
    Posts
    29

    Question Scrolling an image ???

    I have a 800x600 image inside a 240x320 picturebox and I want to use the scrollbars to move around the image... I found this function in the API, but I don't know if it's for that... besides there are 2 parameters that I don't understand. Could someone give a hint about this...

    The function is :

    Declare Function ScrollDC Lib "user32" (ByVal hdc As Long, ByVal dx As Long, ByVal dy As Long, lprcScroll As RECT, lprcClip As RECT, ByVal hrgnUpdate As Long, lprcUpdate As RECT) As Long

    The parameters as I see them :

    hdc : Handle of the picture box (easy)
    dx : Numbers of pixels that I want to move horizontally (Positive is right, Negative is left)
    dy : Numbers of pixels that I want to move vertically (Positive is down, Negative is up)
    lprcScroll : A rectangle that defines the full area of the image
    lprcClip : A rectangle that defines the area of the image that I
    see
    hrgnUpdate : I don't know !!!!!!!!!!
    lprcUpdate : I don´t know !!!!!!!!!!!!


  2. #2
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    I think that's only for memory DCs, but you could use BitBlt just as easy. (easier actually!)
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  3. #3

    Thread Starter
    Junior Member Cadejos's Avatar
    Join Date
    Dec 2000
    Location
    Costa Rica
    Posts
    29
    But if I use BitBlt to scroll the image I will need to mantain the original image in other place, or won't I ?

  4. #4
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    That's correct.
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

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