|
-
Nov 25th, 2002, 08:21 AM
#1
Thread Starter
Fanatic Member
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.
-
Nov 25th, 2002, 08:32 AM
#2
Frenzied Member
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:
Option Explicit
Dim WithEvents vbLink As EventVB.APIFunctions
Dim WithEvents vbWnd As New ApiWindow
Private Sub Form_Load()
Set vbLink = New APIFunctions
Set vbWnd = New ApiWindow
vbWnd.hWnd = Me.hWnd
With vbWnd
.ScrollBars = vbVertical
.VirtualHeight = 1000
.AutoScroll = True
End With
vbLink.SubclassedWindows.Add vbWnd
End Sub
Hope this helps,
Duncan
-
Nov 25th, 2002, 08:47 AM
#3
Thread Starter
Fanatic Member
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.
-
Nov 25th, 2002, 08:55 AM
#4
PowerPoster
Have you downloaded EventVB.dll?
-
Nov 25th, 2002, 08:59 AM
#5
Thread Starter
Fanatic Member
yeah... next..
yes... where do i put it... without being rude !lol
-
Nov 25th, 2002, 09:03 AM
#6
PowerPoster
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>
-
Nov 25th, 2002, 09:22 AM
#7
Frenzied Member
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.
-
Dec 7th, 2002, 01:30 PM
#8
Junior Member
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
:-)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|