Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Visual Basic 5, Programming Basics of VScroll! Need Help!

Status
Not open for further replies.

ifilikeituwill

Technical User
May 6, 2009
15
0
0
US
Hello Programmmers! I have the following Visual Basic 5 program half working and would like help finishing! I don't know some basic's needed to complete the VScroll1 function in this program.
To start with, this program is in Visual Basic 5. A Standard.EXE form was used in this project!
The following was put on the form1.
(1) Text1.Textbox, Text2.Textbox, and Text3.textbox.
(2) Command0.CommandButton, Command1.CommandButton, Command2.CommandButton, Command3.CommandButton, and Command4.CommandButton. Exit.CommandButton.
(3)VScroll1.VScrollBar.

The CommandButtons take care of updateing the (3) Textboxes in the program!
(4) What is left is to figure out is the VScroll1.ScrollBar Code to inVoke the (5) CommandButtons from the VScroll1.Value (Each Scroll value invokes a commandbutton).
(5) Change each CommandButton Property (Command0.Visible=True) in the property window to false and see if VScroll1.ScrollBar still works!
(6) Is their a way to add Delay to VScroll when holding the up/down scroll button down to scroll?
Thanks for Helping and reading this project! Source Code Follows! ifilikeituwill

VScroll1.Value = (0)
Text3.Text = "Scroll 0"
End Sub
Private Sub Command1_Click()
Text1.Text = "Cmd 1 Clicked"
Text2.Text = "-1"
VScroll1.Value = (1)
Text3.Text = "Scroll 1"
End Sub
Private Sub Command2_Click()
Text1.Text = "Cmd 2 Clicked"
Text2.Text = " 0"
VScroll1.Value = (2)
Text3.Text = "Scroll 2"
End Sub
Private Sub Command3_Click()
Text1.Text = "Cmd 3 Clicked"
Text2.Text = "+1"
VScroll1.Value = (3)
Text3.Text = "Scroll 3"
End Sub
Private Sub Command4_Click()
Text1.Text = "Cmd 4 Clicked"
Text2.Text = "+2"
VScroll1.Value = (4)
Text3.Text = "Scroll 4"
End Sub
Private Sub Exit_Click()
End
End Sub
Private Sub VScroll1_Change()

End Sub
 
What is it your program is actually supposed to do? I've read this and your other post and I'm not sure, could you please clarify for me?

HarleyQuinn
---------------------------------
Carter, hand me my thinking grenades!

You can hang outside in the sun all day tossing a ball around, or you can sit at your computer and do something that matters. - Eric Cartman

Get the most out of Tek-Tips, read FAQ222-2244: How to get the best answers before posting.

 
Hi HarleyQuinn!
Well To State it simply, I want to make
the CommandButtons not seen! That means I need
the VScroll to activate one command button at
a time so it takes the place of the Command
Buttons. VScroll should invoke each button as
it scrolls one position. The command button is
activated by the VScroll and proves it was
activated by writting to the TextBoxes! Do you
see what I mean and have been trying to do for
years Now HarleyQuinn? Thanks!

ifilikeituwill!




 
Ok, first you need to work out what the values of VScroll are going to be (you can do this by putting breakpoint on the VScroll_Scroll event or putting a Debug.Print VScroll.Value in that same event) then you can use the code I posted in your other thread (thread222-1547153) with the correct scroll values (which unless the max property of the scroll bar is 3 are unlikely to be 0,1,2,3) to make your button fire.

Just out of interest, as I now vaguely understand what you are trying to do, why do you want to do this?

HarleyQuinn
---------------------------------
Carter, hand me my thinking grenades!

You can hang outside in the sun all day tossing a ball around, or you can sit at your computer and do something that matters. - Eric Cartman

Get the most out of Tek-Tips, read FAQ222-2244: How to get the best answers before posting.

 
Hi HarleyQuinn,
I want to fix another program I made when VB5 came out to run nicer that i wrote along time ago! You know update it! Thanks!

ifilikeituwill
 
Hello!
Thank you all for the programming tips!
Please read the other popst too on this subject!

As Strongm has the correct programming tip!
Thank you Strongm!!!!!

Ifilikeituwill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top