Click to See Complete Forum and Search --> : Size


ariel_au
March 28th, 2001, 03:05 AM
i created 2 forms called, frmMain and frmCustom.
frmCustom is for user to enter "Height" and Width"
frmMain is to show the number of ImageBox (imagebox must fit in perfectly in the frame) determined by the input
height and width from frmCustom.
e.g:
if height: 5 , width:4 then there will be 20 imageboxes(fit in frame).

how can i get that?

SAKYA
March 28th, 2001, 03:23 AM
try control array.take an image box and set it't index property to 0.this creats a control array.now u can load as many image boxes as u like by using the index property.the code for loading more boxes is:
load nameofcontrol(index)
ex:-load image1(1)
this code will load one image box of the same control array with index 1.u can use a loop to load as many of them as u want.but remember that the new control will inherit all the properties of the parent control.so to see it,u must give it unique left and top properties and set it's visible property to true.try it and let me know if u have any doubts.

ariel_au
March 28th, 2001, 04:14 AM
thank you,
well, my problem is that how can i get the height and width from "frmCustom" to draw no. of imageboxes into the "frmMain" and fit in the frame.
the "height" input is using "Textbox"
and the "width" input is using "Textbok" also.
and they are activited by the command button "OK"