Welcome to Dream.In.Code
Become a VB Expert!

Join 149,970 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 1,390 people online right now. Registration is fast and FREE... Join Now!




VBScrollBar programming in VB6

 
Reply to this topicStart new topic

VBScrollBar programming in VB6

blueghost
15 Jan, 2008 - 06:52 PM
Post #1

New D.I.C Head
*

Joined: 10 Jan, 2008
Posts: 2

Hello,

I am making a small progs to do calculations.
It's mainly textboxes and labels, except the command buttons.
It's not a real complicated progs.

However, the prog is used on different computers, using different screen resolution.
Now, on my laptop, all fit, but on other desktop, it's doesn't fit the screen.

I thought to place a VBScrollBar in the frame, but learned it's not doable.

I place all the textboxes, labels and command button in a container (frame1).

The Scrollbar works, but the contents in the frame don't move at all.

Any idea on how I can program the VScrollBar to move (lower or higher) all the frame content ?

Thanks for your help :-)
User is offlineProfile CardPM
+Quote Post

PsychoCoder
RE: VBScrollBar Programming In VB6
15 Jan, 2008 - 07:45 PM
Post #2

using DIC.Core;
Group Icon

Joined: 26 Jul, 2007
Posts: 9,483



Thanked: 161 times
Dream Kudos: 9075
Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net

My Contributions
I wrote a tutorial on resizing the form based on the current screen resolution that I think you may be looking for smile.gif

Happy Coding!
User is offlineProfile CardPM
+Quote Post

Banned
RE: VBScrollBar Programming In VB6
15 Jan, 2008 - 09:38 PM
Post #3

New D.I.C Head
*

Joined: 18 Oct, 2007
Posts: 12


My Contributions
Hi:
To move the container (frame1) you have to change the top property with the VScroll_Change event.

CODE

Private Sub VScroll1_Change()
  Frame1.Top = -VScroll1.Value
End Sub


In the next example i use a picturebox (Picture1) as a container for the frame1 control with the main controls to move it around.

You can also follow PsychoCoder tutorial to resize the main form based on the current screen resolution icon_up.gif .

crazy.gif

Attached File  VScroll.zip ( 1.99k ) Number of downloads: 52


This post has been edited by Banned: 15 Jan, 2008 - 09:42 PM
User is offlineProfile CardPM
+Quote Post

blueghost
RE: VBScrollBar Programming In VB6
16 Jan, 2008 - 06:55 PM
Post #4

New D.I.C Head
*

Joined: 10 Jan, 2008
Posts: 2

Thanks both of you.

It's a real pain to get stuck in programming blink.gif

I will try both method... Anyway, the project status is always work in progress since I need to add things, remove other things...


Thanks again, you were very helpful. smile.gif
User is offlineProfile CardPM
+Quote Post

PsychoCoder
RE: VBScrollBar Programming In VB6
16 Jan, 2008 - 07:58 PM
Post #5

using DIC.Core;
Group Icon

Joined: 26 Jul, 2007
Posts: 9,483



Thanked: 161 times
Dream Kudos: 9075
Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net

My Contributions
That tutorial also resizes the controls based on the size of the form as well
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/8/09 06:34PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month