473,793 Members | 2,974 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VB6.0 : How to make the form can be scroll by VScrollBar

wassup
34 New Member
Hi,
I have a problem on I want my form over Height exceed limit and can be scroll by using VScrollBar. How should I do? Is that using source code or just add in VScrollBar?
Thanks for the help.
May 22 '07 #1
10 25230
Dököll
2,364 Recognized Expert Top Contributor
Hi,
I have a problem on I want my form over Height exceed limit and can be scroll by using VScrollBar. How should I do? Is that using source code or just add in VScrollBar?
Thanks for the help.
Hello!

If your form is bigger than the screen you're on Windows automatically adds in scroll bars. Can you tell us a little more as to what exactly you hope to achieve?
May 22 '07 #2
Killer42
8,435 Recognized Expert Expert
Hi,
I have a problem on I want my form over Height exceed limit and can be scroll by using VScrollBar. How should I do? Is that using source code or just add in VScrollBar?
In my experience, you can't make a VB window larger than the screen. But what you could do is place all of your controls in a picture box, make that larger than the window, and scroll it around within the form.

Of course, it might make development work difficult. Perhaps you should look into an alternative such as a tabbed interface. Or place the controls in a more accessible location during development, and have your code move them into position at runtime.
May 22 '07 #3
wassup
34 New Member
Actually is like that, I have a form and I want separate it to 2 section by using Frame, so when I complete putting all the textbox, checkbox, button and so on in the Frame1 and its already full of the widows size form. My idea is want to add the VScrollBar beside the form and I can scroll down and add in the other section into the Frame2, so is that can make it without using PictureBox?
Thanks.
May 22 '07 #4
Killer42
8,435 Recognized Expert Expert
Like I said, I don't think it's possible to make your window larger than the screen.
May 22 '07 #5
wassup
34 New Member
Like I said, I don't think it's possible to make your window larger than the screen.
Ok thanks Killer. I just want learn new skills if that is possible. ^_^
May 22 '07 #6
wassup
34 New Member
Hi,
Me again. I add my control inside PictureBox already but it still can't scroll. Its that something wrong to my source code? Please help, thanks.

Here my source code:
Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Load()
  2.  
  3.     Picture1.Move 0, 0, 16000, 16000
  4.     Picture1.AutoRedraw = True
  5.  
  6.     VScroll1.Min = 1
  7.     VScroll1.Max = -100
  8.     VScroll1.LargeChange = 5
  9.     VScroll1_Scroll
  10. End Sub
  11.  
  12. Private Sub VScroll1_Change()
  13.     VScroll1_Scroll
  14. End Sub
  15.  
  16. Private Sub VScroll1_Scroll()
  17. Dim j
  18. Static Busy As Boolean
  19.  
  20.     If Busy Then Exit Sub
  21.     Busy = True
  22.     Picture1.Cls
  23.     j = VScroll1.Value
  24.  
  25.     Busy = False
  26. End Sub
May 23 '07 #7
Dököll
2,364 Recognized Expert Top Contributor
Actually is like that, I have a form and I want separate it to 2 section by using Frame, so when I complete putting all the textbox, checkbox, button and so on in the Frame1 and its already full of the widows size form. My idea is want to add the VScrollBar beside the form and I can scroll down and add in the other section into the Frame2, so is that can make it without using PictureBox?
Thanks.
I thought it possible since word docs when empty, no scroll bars are there, but when doc gets larger, scroll bars gallore. Got an idea though, fans. Get ready to be happy Wassup, plug this into your form code. You can achieve what you need doing the following:

(1) Add your command button for code that runs to communicate with your textboxes right on Frame1

(2) At the end of the code, say:
Expand|Select|Wrap|Line Numbers
  1. Frame1.Visible = False
  2. Frame2.Visible = True
  3. End Sub
  4.  
My guess is you have textboxes on Frame2, if not:

(3) Add these wonderful textboxes
(4) Add another command button on Frame2, but this time, at the end of your code that that communicates with textboxes on that frame, say:
Expand|Select|Wrap|Line Numbers
  1. Unload Me
  2. MyForm.Show
  3. End Sub
  4.  
My form, by the way being the name of your form...

What this means is when you have finished with frames, 1 & 2 your next click should bring you back to the begining, refreshing you app to start over to Frame1.

Try that, see what you have...
May 23 '07 #8
wassup
34 New Member
I thought it possible since word docs when empty, no scroll bars are there, but when doc gets larger, scroll bars gallore. Got an idea though, fans. Get ready to be happy Wassup, plug this into your form code. You can achieve what you need doing the following:
Thanks Dokoll. I think i know how to do now.
May 23 '07 #9
Killer42
8,435 Recognized Expert Expert
Thanks Dokoll. I think i know how to do now.
I'm glad someone does, because I didn't really follow it.

Anyway, if you want to scroll the picturebox around, just move it based on the value of the scrollbar.
May 23 '07 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

0
2040
by: syed_saqib_ali | last post by:
Please take a look at and run the code snippet shown below. It creates a canvas with vertical & Horizontal scroll-bars. If you shrink the window to smaller than the area of the canvas, the scroll-bars work as advertised. That's great. However, if you click the Left Mouse button, it calls code which expands the width of the canvas by 100 pixels. The area being viewed expands correspondingly..... BUT I DON'T WANT IT TO!!
1
5161
by: Dmitri Shvetsov | last post by:
Hi All, Did somebody play with vScrollBar in C#? I've got a small trouble. When I assign the Maximum value and try to move the slider of the vScrollBar to a maximum position I can't get the maximum value from a vScrollBar.Value. I can assume that to correct this problem is easy. I'm sure that's it's a bug, the developers didn't think about the width of the slider and this width is excluded from the vScrollBar total length, so we're...
1
265
by: Doug | last post by:
I use the following code to add a vScrollbar to a form. How do I get it so if the form height is changed, the scroll bar maximum is changed to reflex then new size. The lastControl is the last Control on the form, which would be the height of the form. I call this on resize of the form. It works fine it the form is not resized. If the form is shortened, the scroll bar does not scroll down to the last control. It the form is lengthened, the...
2
2765
by: Sam | last post by:
Hi, I don't want to use Autoscroll as I want the user to scroll up and down whenever he wants. So i've added a VScrollbar to my form but nothing happens when I move it. How can I scroll the form as I move the scrollbar? Thx
1
1907
by: Karen Hill | last post by:
Hello Access Gurus, I have Access 2000. I created a Form with a Sub-report and that Subreport has a Sub-form. When I expand the Sub-report to show the Sub-form scroll bars appear on the Sub-report so one can view the whole Sub-form. This is how it is supposed to work. Yet, if I expand the Sub-report's most bottom row scroll bars do not appear and consquently the Sub-form is partially hidden! It only happens when trying to expand...
1
2401
by: =?Utf-8?B?U2hhcm9u?= | last post by:
I'm using the System.Windows.Forms.VScrollBar on my form. I'm handling VScrollBar Scroll event. I want to handle the Up, Down, PageUp PageDown keys for this VScrollBar, but when I register to the keyDown and KeyPress events, it never gets there. So I also handled the key events of the form and from there I forwarded the event to the VScrollBar corresponding event, but still the VScrollBar events in never invoked. What should I do so...
0
1104
by: Longkhi | last post by:
Hi everybody. I have quite a problem with the vscrollbar component. The control I'm using has a built-in scrollbar, but I have 5 of those controls, and I would like to bind the external vscrollbar to scroll them all synchronically. I have tried several other methods such as the wndProc override method. It didn't work, so I'm trying this alternative method.
1
1743
by: eBob.com | last post by:
I have two apps, both developed using the same VBE, and both having a VScrollBar, but the two VScrollBars have very different styles. (In the screen shot, which I had hoped to attach but can't, one appears on the left and the other appears on the right. But, even without the screen shot, referring to the two cases as the "left case" and the "right case" seems to make as much sense as any other way of distinguishing the two cases. So...
2
3284
by: bradyounie | last post by:
I'm trying to use a Form's BackgroundImage to display the base image that I'm placing controls on top of. To make the form scroll to the bounds of the image, I set the AutoScrollMinSize. This works great, except that when I scroll, the image gets all chopped up and doesn't automatically refresh when scrolling is done. Is there a way to prevent this problem so that it scrolls smoothly?
0
9518
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10211
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10159
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10000
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9033
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7538
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5560
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4111
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2917
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.