Computing.Net > Forums > Programming > Visual Basic (Vertical Scroll Bar)

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Visual Basic (Vertical Scroll Bar)

Reply to Message Icon

Name: Michael
Date: April 3, 2002 at 19:19:41 Pacific
Comment:

(Thank you Noogle, and Seth for helping me with my array problem!!! )

Does anybody know how to code for a vertical scroll bar, so that when you click the down arrow once a exam question from a file will appear and there is 5 exam questions, so you click the down arrow on the scroll bar each time and a new question appears each click. I have tried so hard to get this to work and have been unsuccessful. If anybody knows any site that could help me or knows anything about scroll bars in Visual Basic talk to me please. My code so far, which is for loading the questions into the vertical scroll but I am stuck!! If you could add something to my code, copy and paste it to show me. HELP ME PLEASE!!!!!!!


Dim Question As String
Dim answer1 As String
Dim answer2 As String
Dim answer3 As String
Dim answer4 As String
Dim Index As Integer
Dim exam As Integer
`
Do While Not EOF(1)

Input #1, Question, answer1, answer2, answer3, answer4

lblQuestion.Caption = Question
lblanswer1.Caption = answer1
lblanswer2.Caption = answer2
lblanswer3.Caption = answer3
lblanswer4.Caption = answer4

Loop

Close #1



Sponsored Link
Ads by Google

Response Number 1
Name: Noogle
Date: April 4, 2002 at 00:19:44 Pacific
Reply:

You want to set the scrollbar largechange smallchange properties and the min and max properties (look on the Microsoft MSDN site for details - very good resource) to what you need and read from the scrollbar value property when the change event fires. Read the relevant question from the file depending on the scrollbar value i.e. value = 0 question = 1 (values generally start from 0 in VB)

You would be well served to look through Microsoft site for MSDN, it contains info on all properties and events for common controls giving examples of usage and related topics

Hope this helped


0

Response Number 2
Name: Raul Lopez
Date: April 5, 2002 at 08:01:09 Pacific
Reply:

Which control with scrollbar are you using?

Combobox, listbox, lisview, dbgrid, msflexgrid, text... some other?


0

Response Number 3
Name: JOSEPHARULRAJA .S
Date: April 12, 2002 at 04:12:25 Pacific
Reply:

how to use ADO WITH oracle and
give connection coding with details


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Visual Basic (Vertical Scroll Bar)

Vertical Scroll Bar (using label boxes) www.computing.net/answers/programming/vertical-scroll-bar-using-label-boxes-/1270.html

VB vertical Scroll bar www.computing.net/answers/programming/vb-vertical-scroll-bar/3664.html

Visual Basic (Arrays) www.computing.net/answers/programming/visual-basic-arrays/1242.html