Results 1 to 2 of 2

Thread: Having problem scrolling using SetScrollInfo API

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2008
    Posts
    155

    Having problem scrolling using SetScrollInfo API

    Hello everyone!
    I'm working on a new application and I use the SetScrollInfo and GetScrollInfo Api's and I'm having some problems:

    1. I'm able to scroll my own textbox control on my form but I can only see the scrollbar being updated and not the text inside the textbox control moving I'm using this code:
    Code:
            Dim si As New SCROLLINFO()
            si.cbSize = Marshal.SizeOf(si)
            si.nPos = ScrollValue
            si.fMask = ScrollInfoMask.SIF_POS
            SetScrollInfo(Handle, ScrollBar, si, True)
    2. The GetScrollInfo and SetScrollInfo Api's doesn't work in other applications and in windows like Firefox and Windows Explorer. I use the GetFocus Api to get the handle but still it doesn't seem to work (nothing happens) I got a dll error saying that the window handle is invalid, I tried both GetFocus and GetForegroundWindow Api's to get the handle, any ideas?

    Thank you!

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Having problem scrolling using SetScrollInfo API

    Moved From The CodeBank

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