Results 1 to 5 of 5

Thread: Key Preview?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2000
    Location
    Wellington NZ
    Posts
    153

    Talking

    I want to use key preview to scroll up and down a list box, the contents of the list box comes from a database and displays a single field in the list box.

    I am not sure if you can use something like

    list1.ListTop

    If you know please can you help me

    Rohan

  2. #2
    Addicted Member
    Join Date
    Apr 2000
    Location
    Sheffield, England.
    Posts
    136
    Don't list boxes scroll automatically (using up/down keys) when they have focus?

    I think I might be misunderstanding the question...
    Visual Basic 6 Enterprise Edition + SP4

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    May 2000
    Location
    Wellington NZ
    Posts
    153

    Thumbs up I want to scroll any way with or with out focus

    I want to be able to scroll even if the control hasnt got the focus, any ideas?

  4. #4
    Lively Member
    Join Date
    Jun 2000
    Location
    Belgium
    Posts
    77

    Smile

    Is this case, you can use this code to go to the element index i in the list.

    Code:
    Sub GotoPosI(i as integer)
     List1.Text = List1.List(i)
    end sub
    KWell

  5. #5
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Use the topindex property to set the item that is topmost in you listbox
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

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