• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 275
  • Last Modified:

Scroll Bars

I want to be able to scroll objects in a frame contol, however a frame control does not have a scroll bar property like that of a text box or list box. Is it possible to link a vertical scroll bar to a frame control via code to produce a scrolling effect ? If so please provide a sample of code. If there is not a way by this method then what are some recommendations to attain this result ?
   Some things I've already experimented with are the updown control, slider control and the vertical scroll bar itself. Please keep in mind though I have experimented with these I'm a novice and very little experience with programming. I might have missed or overlooked something.    I'm using VB5 pro version.
Thank You
0
VBHelp
Asked:
VBHelp
1 Solution
 
MattaCommented:
I don't think it's possible to do that.
You must find out an other way!!
0
 
VBHelpAuthor Commented:
Sorry for the "F" rating.  But your answer is unacceptable, I believe it is possible and you did not even make a single recommendation as an alternative.  I have asked this very same question to other sources on the web and gathered zip files and example forms from other programmers.
The least you could have done for a "C" rating would to have  recommended a company who makes OCX tools and controls, like sheridan for example.
If it were not possible than Windows 95 would never be, nor would all the versions of VB, all the versions of MS Word would be but a lost thought or idea.  Excel,  Publisher, Works and all the slew of other Microsoft products would be but a whim.
Therefore it is POSSIBLE !!!!!!!!!
0
 
twardCommented:
I haven't tried this on a frame control but I have added a horizontal scroll bar to a Listbox.  The calls I used is as follows:

GLOBALS.BAS
--------------------------
Public GreatestLength%

Public Const NUL = 0&
Public Const WM_USER = &H400
Public Const LB_SETHORIZONTALEXTENT = (WM_USER + 21)

Public Declare Function SendMessage Lib "User" (ByVal hWnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, lParam As Any) As Long
Public Declare Function GetFocus Lib "User" () As Integer

-------------------
In My Form
-------------------
Dim ListHwnd%

' Get Focus of New Structure List Box '
NewFilesList.SetFocus

' Get the Window Handle '
ListHwnd = GetFocus()
   
' If the Current Text Width is Greater Than the Last Biggest one '
' then Change/Add Horizontal Scroll Bar to the New Structure    '
' ListBox via the SendMessage API Call                                      '
If TextWidth(CompleteFilename) > GreatestLength Then
 
' Save New Length '
GreatestLength% = TextWidth(CompleteFilename)
         
' Add/Change Size of Horizontal Scroll Bar '
Call SendMessage(ListHwnd%, LB_SETHORIZONTALEXTENT, GreatestLength%, NUL)
-----------

Granted this is for 16 Bit VB4 but you should be able to adjust it for 32 Bit without a problem.  Hope this helps you out!

0
 
VBHelpAuthor Commented:
tward should now be awarded for attempting to answer my question, however the main question has yet to be addressed. But he did make an effort. Therefore a "C" score.
Thanks tward I'll use your example as a model for my program.
0
 
tm050597Commented:
Based on what I think it is you are wanting, I would suggest a tabstrip control.  That, to me, would be a better way of organizing your program.  Reply via email if you would like code.

tm
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now