LebGeeks

A community for technology geeks in Lebanon.

You are not logged in.

#1 March 17 2005

joseza82
Member

vb6 programing problem

here's the thing.i'm using vb6 ,as we know the form dimensions ae limited.
my problem is that at design time i have to create a contol array of labels,
so i create label(0), the then user enters the number of labels needed per line and per column at run time,and the program does the rest,loading alll the labels taht is. The real problem is that if the user wants to enter a large number of lables these labels are loaded but are not visible on the form.

what should i do to make my form scroll,so i can be able to see all the labels i load.??????????

Offline

#2 March 17 2005

Ragnar78
Member

Re: vb6 programing problem

Well what you should do is either expand the form: u can use the width and height propeties.
To do this you should know the size in width and height of your labels.
Depending on the number of labels you have you can get both.

so for example your form height is 10, and each label height is 2:
you know that you can fit 5 labels. If you want to insert another label, you will have to increase the height of your form.

so what you will do will look like this :

Sub IncreaseFormHeight ()
Form.height =form.height + 2
end sub

you will have to call this sub everytime you want to add a label.

Now to prevent the form from increasing with the 1st label, you jsut do a check on the the label number.

So suppose you are at label(I), you add a condition

If I > 5 then call IncreaseFormHeight

You can do the same with width

Offline

#3 March 17 2005

joseza82
Member

Re: vb6 programing problem

10x man ,but i've already done that , i'm asking if there's a way to scroll my form so i can see all the labels i loaded.....

Offline

#4 March 17 2005

joseza82
Member

Re: vb6 programing problem

anyone plz help!!!!!!!!!!!!!!!!!!!!!!!
how can i make my form scroll , so i can be able to scroll to all the labels i created.(think that the number of labels is huge,that is the size of the FullFormHeigth is way larger than the DisplayHeight
of the form)

Offline

#5 March 17 2005

samer
Admin

Offline

#6 November 30 2005

fnzahar
Member

Re: vb6 programing problem

if i was you...

i don't even put my self into this problem...

i could load all the layers i want... in an array...
and made them visible my frame...
frame1 , frame2, frame3 ....

and i create a navigation bar... as next and previous, to hide and show the frames i desier....

in this way, the navigation for the layers will be smoother... and i think it's a good way to solve your problem...

Offline

Board footer