Results 1 to 8 of 8

Thread: STILL UNRESOLVED. Vertical Scroll Bars

  1. #1

    Thread Starter
    Fanatic Member VisionIT's Avatar
    Join Date
    Nov 2002
    Location
    Workin'...
    Posts
    718

    Angry STILL UNRESOLVED. Vertical Scroll Bars

    Hi All.

    I have pretty much finished a package i have been working on for a while, but have hit a bl**dy big glitch. All the data in the invoice form will not display on screen without a vertical scroll bar. How can i insert one without re-doing the forms?

    How do you get it to scroll the whole form, and obviously print the whole form at the end?

    This is desperately urgent, so any help would be much appreciated. If anyone has any code snippets that would be gr8.

    Cheers all.

    Paul.
    Last edited by VisionIT; Nov 25th, 2002 at 09:10 AM.

  2. #2
    Frenzied Member MerrionComputin's Avatar
    Join Date
    Apr 2001
    Location
    Dublin, Ireland
    Posts
    1,616
    You can add a vertical scrollbar to a form by setting the window style WS_VSCROLL and subclassing it to manage the WM_SCROLL messages...I have wrapped this functionality in the EventVB.dll which you could use by adding this to your form:-

    VB Code:
    1. Option Explicit
    2.  
    3. Dim WithEvents vbLink As EventVB.APIFunctions
    4. Dim WithEvents vbWnd As New ApiWindow
    5.  
    6. Private Sub Form_Load()
    7.  
    8.  
    9. Set vbLink = New APIFunctions
    10.  
    11. Set vbWnd = New ApiWindow
    12. vbWnd.hWnd = Me.hWnd
    13.  
    14. With vbWnd
    15.     .ScrollBars = vbVertical
    16.     .VirtualHeight = 1000
    17.     .AutoScroll = True
    18. End With
    19.  
    20. vbLink.SubclassedWindows.Add vbWnd
    21.  
    22.  
    23. End Sub

    Hope this helps,
    Duncan
    ----8<---------------------------------------
    NEW - The .NET printer queue monitor component
    ----8<---------------------------------------
    Now with Examples of use

  3. #3

    Thread Starter
    Fanatic Member VisionIT's Avatar
    Join Date
    Nov 2002
    Location
    Workin'...
    Posts
    718

    thanx for the quick response

    Cheers for the quick response m8y, but you sorta lost me a bit.

    I have copied the script into VB Sub_Formload procedure... and it says "Invalid use of new keyword" ??

    Sorry if i'm missing something stupid here... fairly new to this...

    Thanks in advance.

    Paul.

  4. #4
    PowerPoster
    Join Date
    Aug 2000
    Location
    India
    Posts
    2,288
    Have you downloaded EventVB.dll?

  5. #5

    Thread Starter
    Fanatic Member VisionIT's Avatar
    Join Date
    Nov 2002
    Location
    Workin'...
    Posts
    718

    yeah... next..

    yes... where do i put it... without being rude !lol

  6. #6
    PowerPoster
    Join Date
    Aug 2000
    Location
    India
    Posts
    2,288
    I am not sure, but I think you need to register it. Put it in your windows system directory and try this:
    regsvr32 <path_to_Eventvb.dll>

  7. #7
    Frenzied Member MerrionComputin's Avatar
    Join Date
    Apr 2001
    Location
    Dublin, Ireland
    Posts
    1,616
    How to add an ActiveX dll to a VB project

    Open your project in Visual basic
    Select the menu Project::References
    In the resulting dialog box press the Browse... button
    Find the EventVB_H.dll and double click on it
    Press OK on the references dialog box.
    ----8<---------------------------------------
    NEW - The .NET printer queue monitor component
    ----8<---------------------------------------
    Now with Examples of use

  8. #8
    Junior Member
    Join Date
    Dec 2002
    Location
    Ohio
    Posts
    20

    Scroll Bar

    hey
    i just got done with a program(well most of it). If you add a rich text box to the form then just go to the scroll bar property in the rich text box and it will add scroll bars for u.
    with out any code
    If once u don't susceed, Get the info from someone else. lol
    Code:
    Me = ok
    U = Good
    :-)

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