Try this:
pnlTransaction.FullScroll(True)
DoEvents
pnlTransaction.FullScroll(True)
DoEvents
Yep. That's what I just finished succeeding at. Found FullScroll, realized it would let me scroll to the end of the text, then I'd read the ScrollPosition, then I'd set it to the remembered scroll position and use the FullScroll value when I did my:
Sub scvACIMChapter_ScrollChanged(Position AsInt)
' ...
End Sub
However, it took more fiddling than just two successive FullScroll(True) and DoEvents. I had to put an assignment between the two, and I forced the Focus first.
Then, the code for interpreting the beginning and end point also had to be fiddled-with.
IfDoGlowThen
If Position < 20Then
ImageViewACIMTopGlow.Visible = False
Else
ImageViewACIMTopGlow.Visible = True
EndIf
If Position > (scvACIMFullScroll - 5) Then
ImageViewACIMBottomGlow.Visible = False
Else
ImageViewACIMBottomGlow.Visible = True
EndIf
IfPGDebugging4ThenLog("scvACIMChapter_ScrollChanged() - scvACIMHeight = " & scvACIMHeight)
IfPGDebugging4ThenLog("scvACIMChapter_ScrollChanged() - scvACIMTextHeight = " & scvACIMTextHeight)
IfPGDebugging4ThenLog("scvACIMChapter_ScrollChanged() - scvACIMFullScroll = " & scvACIMFullScroll)
EndIf
So, I'm comparing whether it is CLOSE to 0, or CLOSE to the end.
And I'm checking for a digits bobble at the front-end.
It is seems extremely reliable. It isn't sometimes not getting the longest scroll wrong (sometimes it would = 0).
Anyways, thank you.
Sometimes even doing it twice doesn't give it enough time to actually do it.
The code at the front-end is like this:
Sub scvACIMChapter_ScrollChanged(Position AsInt)
Dim NewPosition AsInt
IfDoScrollPosThen
IfPGDebugging4ThenLog(" +++ Begin of scvACIMChapter_ScrollChanged()")
NewPosition = scvACIMChapter.ScrollPosition
If NewPosition <> Position Then
IfPGDebugging4ThenLog("scvACIMChapter_ScrollChanged() - Position NOT SAME")
Position = NewPosition
EndIf
IfPGDebugging4ThenLog("scvACIMChapter_ScrollChanged() - Position = " & Position)
SaveACIMScrollPos(Position, FigureACIMNumber(""))
IfDoGlowThen
If Position < 20Then
ImageViewACIMTopGlow.Visible = False
Else
ImageViewACIMTopGlow.Visible = True
EndIf
If Position > (scvACIMFullScroll - 5) Then
ImageViewACIMBottomGlow.Visible = False
Else
ImageViewACIMBottomGlow.Visible = True
EndIf
IfPGDebugging4ThenLog("scvACIMChapter_ScrollChanged() - scvACIMHeight = " & scvACIMHeight)
IfPGDebugging4ThenLog("scvACIMChapter_ScrollChanged() - scvACIMTextHeight = " & scvACIMTextHeight)
IfPGDebugging4ThenLog("scvACIMChapter_ScrollChanged() - scvACIMFullScroll = " & scvACIMFullScroll)
EndIf
DoEvents
IfPGDebugging4ThenLog(" --- End of scvACIMChapter_ScrollChanged()")
IfPGDebugging4ThenLog(" ")
EndIf
End Sub