473,412 Members | 2,048 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,412 software developers and data experts.

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

wassup
34
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 25018
Dököll
2,364 Expert 2GB
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 Expert 8TB
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
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 Expert 8TB
Like I said, I don't think it's possible to make your window larger than the screen.
May 22 '07 #5
wassup
34
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
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 Expert 2GB
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
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 Expert 8TB
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
Hi, What you could do is use the MDI interface, open your form as an mdi child of an MDI form, set the forms height to say 20000 twips and you can then scroll up and down the form with the MDI scroll bar. You can have a MDI child form larger than the screen size within an MDI parent.

In the Activate code of the form enter the line Me.height=20000.
and you end up with something like this:



regards
Steve
Nov 29 '09 #11

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

Similar topics

0
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...
1
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...
1
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...
2
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...
1
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...
1
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...
0
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...
1
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,...
2
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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...
0
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,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.