Problems with VScroll-Control 
Author Message
 Problems with VScroll-Control

Hi,

i have build an Usercontrol which load some controls automatically on a
Panel (Picturebox)
If the Panel is greater as the Usercontrol, i want to enable an Scroll-Bar
(VScroll). This is working.
But the Size of the Slider on the Scrollbar is allways the same and when i
am scrolling, the whole Control flickers.

Here is my program-code:

Add a new Control:
    ' Prfen ob das Attribut nicht mehr auf das Panel passt
    If .Top + .Height >= pnlAttributes.Height Then
    '
      ' Ja, das Panel ist zu klein..
      pnlAttributes.Height = .Top + .Height
      vsbAttributeBox.Enabled = True

      ' Geteilt durch 1000, da die max eigenschaft auf Integer beschr?nkt st
      vsbAttributeBox.Max = (pnlAttributes.Height / 1000) -
(UserControl.Height / 1000)
    '
    End If

ScrollbarEvents:

    Private Sub vsbAttributeBox_Change()
      ' Reagiert auf das Klick-Ereignis der Schaltfl?chen in dem
Scroll-Balken

      If vsbAttributeBox.Value = 1 Then
        pnlAttributes.Top = pnlFrame.Top + 100
      Else
        pnlAttributes.Top = vsbAttributeBox.Value
        pnlAttributes.Top = pnlAttributes.Top * -1000
      End If

    End Sub

    Private Sub vsbAttributeBox_Scroll()
      ' Reagiert auf das Scroll-Ereignis der Scroll-Box

      If vsbAttributeBox.Value = 1 Then
        pnlAttributes.Top = pnlFrame.Top + 100
      Else
        pnlAttributes.Top = vsbAttributeBox.Value
        pnlAttributes.Top = pnlAttributes.Top * -1000
      End If

    End Sub

It would be nice, if someone could help me!

Bye Stephan



Wed, 07 Jan 2004 15:07:09 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Keeping VScroll.Value=VScroll.max

2. VScroll-problem

3. VScroll Problems

4. Problems with VScroll...

5. Vscroll-control does not appear in 3D in Win 3.1/3.11

6. Scrolling a text box with the VSCroll Control

7. Help for VScroll control in VB5

8. VScroll Control

9. VScroll control VB5

10. Help! with VScroll control VB 5

11. Capturing VScroll and WndProc

12. Help Creating a useful VScroll bar

 

 
Powered by phpBB® Forum Software