Results 1 to 6 of 6

Thread: [RESOLVED] Form - Vertical Scroll Position - ????

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    May 2006
    Posts
    612

    Resolved [RESOLVED] Form - Vertical Scroll Position - ????

    I am trying to view a form with it scrolled to the top when it comes into view, I have tried this

    Code:
    Form3.ScrollControlIntoView(Form3.Label34)
    With no luck, at the moment when the form is viewed it is in the same position as last time it was visible which is not what I want to happen.

    Is this possible

  2. #2
    Fanatic Member Strider's Avatar
    Join Date
    Sep 2004
    Location
    Dublin, Ireland
    Posts
    612

    Re: Form - Vertical Scroll Position - ????

    Barry


    Visual Studio .NET 2008/Visual Studio .NET 2005/Visual Studio .NET 2003
    .NET Framework 3.0 2.0 1.1/ASP.Net 3.0 2.0 1.1/Compact Framework 1.0

    SQL Server 2005/2000/SQL Server CE 2.0


    If you like, rate this post

    Compact Framework for Beginners

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    May 2006
    Posts
    612

    Re: Form - Vertical Scroll Position - ????

    Barry

    The form does not have a vertical scrollbar but it has autoscroll enabled which creates a vertical scrollbar if the form needs to scroll to display all of the controls which it does.

    This autoscrollbar does not seem to have a vScrollBar.Value and therefore I cannot set it


    I have tried these to date all with no luck

    Form3.ScrollControlIntoView(Form3.Label34)

    Form3.vScrollBar1.Value = 0

    Form3.AutoScrollPosition = 0

    Form3.AutoScrollPosition(0, 0)

    Form3.AutoScrollPosition(1, 1)

    Form3.PerformAutoScale()


    Last edited by JohnSavage; May 31st, 2007 at 11:42 AM.

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    May 2006
    Posts
    612

    Re: Form - Vertical Scroll Position - ????

    Come come Guys it's nearly a week now - any ideas on this one ??

  5. #5
    Frenzied Member
    Join Date
    Oct 2005
    Posts
    1,286

    Re: Form - Vertical Scroll Position - ????

    Hi,
    try
    Me.AutoScrollPosition = New Point(label234.left, label234.top)

    Pete
    Pete Vickers
    MVP - Device Application Development
    http://www.gui-innovations.com http://mobileworld.appamundi.com/blogs/

  6. #6

    Thread Starter
    Fanatic Member
    Join Date
    May 2006
    Posts
    612

    Re: Form - Vertical Scroll Position - ????

    Pete

    You are the man!

    Many thanks (again!)

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