Current location: Hot Scripts Forums » Programming Languages » Visual Basic » Scroll bars help!!!!!


Scroll bars help!!!!!

Reply
  #1 (permalink)  
Old 09-27-06, 05:16 AM
afiltroi afiltroi is offline
New Member
 
Join Date: Sep 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Scroll bars help!!!!!

Hello from Greece Europe.
I am a newcomer here and a newbie in VB6. I have written a code (merging two others that i found) in order to create a form with two scrollbars (vertical and horizontial). Both scrollbars are resizable and move every object that is included in the form. But there is a small problem with the existent code. When i use for instance the vertical scroll in order to move down the objects of the form, the horizontial scroll bar also moves down. When i use the cursor in order to resize the form, then the horizontial bar reposes in the bottom of the form.
Can someone help me with this?
I attach the code that i have created.
In case someone has another code that works, this is more more than welcome.
ATTENTION!!! I am not interested in the code that works using a PictureBox.

Thanks in advance.
Attached Files
File Type: zip SCROLLBARS.zip (1.8 KB, 72 views)
Reply With Quote
  #2 (permalink)  
Old 10-09-06, 02:24 PM
mickeyray mickeyray is offline
Newbie Coder
 
Join Date: Apr 2006
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Private Sub pScrollForm()

Dim ctl As Control

For Each ctl In Me.Controls
If Not (TypeOf ctl Is VScrollBar) And Not (TypeOf ctl Is HScrollBar) And _
Not (TypeOf ctl Is CommandButton) Then
ctl.Top = ctl.Top + oldPos - VScroll1.Value
End If
Next
For Each ctl In Me.Controls
If Not (TypeOf ctl Is HScrollBar) And Not (TypeOf ctl Is VScrollBar) And _
Not (TypeOf ctl Is CommandButton) Then
ctl.Left = ctl.Left + oldPos1 - HScroll1.Value
End If
Next
oldPos = VScroll1.Value
oldPos1 = HScroll1.Value
End Sub
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
scroll bars timmy long CSS 1 01-24-06 03:09 AM
JavaScript Scroll help... Thomas82 JavaScript 1 04-30-05 08:42 AM
Disable scroll bars in a page mic_scp JavaScript 1 11-11-04 02:44 PM
To open a popup with specific dimensions and tools eg no scroll bars Imp JavaScript 2 11-01-03 08:26 PM


All times are GMT -5. The time now is 01:17 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.