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?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Davy070599Connect With a Mentor Commented:
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
 
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
All Courses

From novice to tech pro — start learning today.