Vetical scrollbar's position

To,
experts
On vb form i put one picture1 and vertical scrollbar control.I changes property as i mention
it below.

Picture1-> Left=0
         Height=8325
         Top=120
         Width=11655
Vscroll1->Height=8295
        Largechange=20
        smallchange=5
        Left=11700
        max=205
        min =5
        width = 255
Form1-> Height=6975
      width=12000
      left= -15
      scaleheight=8235
      scalewidth=11835
      windowstate= 0-normal
      startupposition = 3-windows Default
When i run the project then position of scrollbar is proper.But when i click on "maximize button"
then it has been changed.

I mean i want to set position of scrollbar in such a way that even if user click on maximize button
then it properly fits into the right side of form.

 
Thanks,
buddy
bhavesh55Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Davy070599Commented:
Hi,

paste this code in the "resize" event of your form:

If Me.WindowState <> vbMinimized Then
  Vscroll1.Left = Picture1.Left + picture1.Width + 5
End If





0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
bhavesh55Author Commented:
To,
davy
But still i have one problem.Like anyone can reach at the border of form and resize my form using
mouse.But i don't want to allow it to user.

I mean my form is of fixed size like it covers whole screen of monitor and anyone can't
resize it using mouse.

Thanks,
bhavesh
0
Davy070599Commented:
hi,

change the following property of your form:

borderstyle -> 1 - fixed single

(option 3 or 4 can also be used)

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Hardware

From novice to tech pro — start learning today.