It seems your making a mistake in providing the arguemnts for your max scroll.
Quote:
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load scrollhandler = New MyListener(FlowLayoutPanel1) maxscroll = CalcMaxScroll(FlowLayoutPanel1.Size.Height, FlowLayoutPanel1.Size.Width, 114, 1075, 19) '19 number of tweets '114 height of tweettimelinecontrol '1075 width of flowlayoutpanel1 'last number tells the number of items. (read that from a global var) End Sub
You say that the with of your flowlayoutpanel is 1075. yet you apply it to the formula as the with of your tweettimelinecontrol. quoting you from a previous post:
Quote:
Oh that kinda worked... but how am I ganna calculate the value in a control like this one: When its normal screen size: http://foto.pk/images/minx.png\[^\]
you can see in the screenshot that you got 2 of those controls next to eachoter so it can never be the total size of your flowlayoutpanel. please check the with property of your Tweettimelinecontrol and change the value. while your at it also change the 19 with a flowlayoutpanel.items.count to make sure it are 19.