Can't fit this f***ing PictureBoxes in my form!!!
It''s driving nuts!!! HELP!! I can''t stand that! I''m trying to make a function in VB that wil give me how much same PictureBoxes can be arranged horizontaly and Verticaly in my Form with a standard space bettween them! I tried something like that!
Private Function GetFitBoxesNo(FBoxPos As Integer, FormsLen As Integer, BoxesLen As Integer) As Integer
i = 0
Do
If FormsLen <= (FBoxPos + BoxesLen) + (Space + BoxesLen) * i Then Exit Do
i = i + 1
Loop
GetFitBoxesNo = i
End Function
When I was putting for FormsLen=form1.height, it was giving me wrong results! So, I tried ScaleHeight that seemed to work! But When I wanted to see how much could fit in a maximized Form(depending to the screen resolution), I used Screem.Height, but it keeps giving me one more PictueBox!
What''s so wierd with this ScaleWidth thing!
Please give me a hand here or else....I''ll kill myself!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement