i have bundle of text boxes to get an input..
i have textboxes that some how work like data grid...
i have 4 colums of textboxes and each colum have 30 textboxes as an array in picture box..
now i am facing a problem that, every time when i m opening that form its picture box's size changes..
i m providing u code and form too attaching...
kindly help me..
Dim j, k, l, m As Integer
Private Sub Form_Load()
For i = 0 To 7
j = j + Text3(0).Height
k = k + Text4(0).Height
l = l + Text5(0).Height
m = m + Text6(0).Height
Next
Pic1.Height = j And k And l And m
VScroll1.Height = j And k And l And m
For i = 0 To 4
Text3(i).Top = i * Text3(0).Height
Text4(i).Top = i * Text4(0).Height
Text5(i).Top = i * Text5(0).Height
Text6(i).Top = i * Text6(0).Height
Next
End Sub
Private Sub Text6_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer)
On Error Resume Next
If KeyCode = 13 Then
VScroll1.Value = Index + 2
End If
End Sub
Private Sub VScroll1_Change()
Select Case VScroll1.Value
Case 8
For i = 0 To 30
Text3(i).Top = i * Text3(0).Height
Text4(i).Top = i * Text4(0).Height
Text5(i).Top = i * Text5(0).Height
Text6(i).Top = i * Text6(0).Height
Next
Case 9
For i = 0 To 30
Text3(i).Top = (0 - Text3(0).Height) + (i * Text3(0).Height)
Text4(i).Top = (0 - Text4(0).Height) + (i * Text4(0).Height)
Text5(i).Top = (0 - Text5(0).Height) + (i * Text5(0).Height)
Text6(i).Top = (0 - Text6(0).Height) + (i * Text6(0).Height)
Next
Case 10
For i = 0 To 30
Text3(i).Top = (0 - (Text3(0).Height * 2)) + (i * Text3(0).Height)
Text4(i).Top = (0 - (Text4(0).Height * 2)) + (i * Text4(0).Height)
Text5(i).Top = (0 - (Text5(0).Height * 2)) + (i * Text5(0).Height)
Text6(i).Top = (0 - (Text6(0).Height * 2)) + (i * Text6(0).Height)
Next
Case 11
For i = 0 To 30
Text3(i).Top = (0 - (Text3(0).Height * 3)) + (i * Text3(0).Height)
Text4(i).Top = (0 - (Text4(0).Height * 3)) + (i * Text4(0).Height)
Text5(i).Top = (0 - (Text5(0).Height * 3)) + (i * Text5(0).Height)
Text6(i).Top = (0 - (Text6(0).Height * 3)) + (i * Text6(0).Height)
Next
Case 12
For i = 0 To 30
Text3(i).Top = (0 - (Text3(0).Height * 4)) + (i * Text3(0).Height)
Text4(i).Top = (0 - (Text4(0).Height * 4)) + (i * Text4(0).Height)
Text5(i).Top = (0 - (Text5(0).Height * 4)) + (i * Text5(0).Height)
Text6(i).Top = (0 - (Text6(0).Height * 4)) + (i * Text6(0).Height)
Next
Case 13
For i = 0 To 30
Text3(i).Top = (0 - (Text3(0).Height * 5)) + (i * Text3(0).Height)
Text4(i).Top = (0 - (Text4(0).Height * 5)) + (i * Text4(0).Height)
Text5(i).Top = (0 - (Text5(0).Height * 5)) + (i * Text5(0).Height)
Text6(i).Top = (0 - (Text6(0).Height * 5)) + (i * Text6(0).Height)
Next
Case 14
For i = 0 To 30
Text3(i).Top = (0 - (Text3(0).Height * 6)) + (i * Text3(0).Height)
Text4(i).Top = (0 - (Text4(0).Height * 6)) + (i * Text4(0).Height)
Text5(i).Top = (0 - (Text5(0).Height * 6)) + (i * Text5(0).Height)
Text6(i).Top = (0 - (Text6(0).Height * 6)) + (i * Text6(0).Height)
Next
Case 15
For i = 0 To 30
Text3(i).Top = (0 - (Text3(0).Height * 7)) + (i * Text3(0).Height)
Text4(i).Top = (0 - (Text4(0).Height * 7)) + (i * Text4(0).Height)
Text5(i).Top = (0 - (Text5(0).Height * 7)) + (i * Text5(0).Height)
Text6(i).Top = (0 - (Text6(0).Height * 7)) + (i * Text6(0).Height)
Next
Case 16
For i = 0 To 30
Text3(i).Top = (0 - (Text3(0).Height * 8)) + (i * Text3(0).Height)
Text4(i).Top = (0 - (Text4(0).Height * 8)) + (i * Text4(0).Height)
Text5(i).Top = (0 - (Text5(0).Height * 8)) + (i * Text5(0).Height)
Text6(i).Top = (0 - (Text6(0).Height * 8)) + (i * Text6(0).Height)
Next
Case 17
For i = 0 To 30
Text3(i).Top = (0 - (Text3(0).Height * 9)) + (i * Text3(0).Height)
Text4(i).Top = (0 - (Text4(0).Height * 9)) + (i * Text4(0).Height)
Text5(i).Top = (0 - (Text5(0).Height * 9)) + (i * Text5(0).Height)
Text6(i).Top = (0 - (Text6(0).Height * 9)) + (i * Text6(0).Height)
Next
Case 18
For i = 0 To 30
Text3(i).Top = (0 - (Text3(0).Height * 10)) + (i * Text3(0).Height)
Text4(i).Top = (0 - (Text4(0).Height * 10)) + (i * Text4(0).Height)
Text5(i).Top = (0 - (Text5(0).Height * 10)) + (i * Text5(0).Height)
Text6(i).Top = (0 - (Text6(0).Height * 10)) + (i * Text6(0).Height)
Next
Case 19
For i = 0 To 30
Text3(i).Top = (0 - (Text3(0).Height * 11)) + (i * Text3(0).Height)
Text4(i).Top = (0 - (Text4(0).Height * 11)) + (i * Text4(0).Height)
Text5(i).Top = (0 - (Text5(0).Height * 11)) + (i * Text5(0).Height)
Text6(i).Top = (0 - (Text6(0).Height * 11)) + (i * Text6(0).Height)
Next
Case 20
For i = 0 To 30
Text3(i).Top = (0 - (Text3(0).Height * 12)) + (i * Text3(0).Height)
Text4(i).Top = (0 - (Text4(0).Height * 12)) + (i * Text4(0).Height)
Text5(i).Top = (0 - (Text5(0).Height * 12)) + (i * Text5(0).Height)
Text6(i).Top = (0 - (Text6(0).Height * 12)) + (i * Text6(0).Height)
Next
Case 21
For i = 0 To 30
Text3(i).Top = (0 - (Text3(0).Height * 13)) + (i * Text3(0).Height)
Text4(i).Top = (0 - (Text4(0).Height * 13)) + (i * Text4(0).Height)
Text5(i).Top = (0 - (Text5(0).Height * 13)) + (i * Text5(0).Height)
Text6(i).Top = (0 - (Text6(0).Height * 13)) + (i * Text6(0).Height)
Next
Case 22
For i = 0 To 30
Text3(i).Top = (0 - (Text3(0).Height * 14)) + (i * Text3(0).Height)
Text4(i).Top = (0 - (Text4(0).Height * 14)) + (i * Text4(0).Height)
Text5(i).Top = (0 - (Text5(0).Height * 14)) + (i * Text5(0).Height)
Text6(i).Top = (0 - (Text6(0).Height * 14)) + (i * Text6(0).Height)
Next
Case 23
For i = 0 To 30
Text3(i).Top = (0 - (Text3(0).Height * 15)) + (i * Text3(0).Height)
Text4(i).Top = (0 - (Text4(0).Height * 15)) + (i * Text4(0).Height)
Text5(i).Top = (0 - (Text5(0).Height * 15)) + (i * Text5(0).Height)
Text6(i).Top = (0 - (Text6(0).Height * 15)) + (i * Text6(0).Height)
Next
Case 24
For i = 0 To 30
Text3(i).Top = (0 - (Text3(0).Height * 16)) + (i * Text3(0).Height)
Text4(i).Top = (0 - (Text4(0).Height * 16)) + (i * Text4(0).Height)
Text5(i).Top = (0 - (Text5(0).Height * 16)) + (i * Text5(0).Height)
Text6(i).Top = (0 - (Text6(0).Height * 16)) + (i * Text6(0).Height)
Next
Case 25
For i = 0 To 30
Text3(i).Top = (0 - (Text3(0).Height * 17)) + (i * Text3(0).Height)
Text4(i).Top = (0 - (Text4(0).Height * 17)) + (i * Text4(0).Height)
Text5(i).Top = (0 - (Text5(0).Height * 17)) + (i * Text5(0).Height)
Text6(i).Top = (0 - (Text6(0).Height * 17)) + (i * Text6(0).Height)
Next
Case 26
For i = 0 To 30
Text3(i).Top = (0 - (Text3(0).Height * 18)) + (i * Text3(0).Height)
Text4(i).Top = (0 - (Text4(0).Height * 18)) + (i * Text4(0).Height)
Text5(i).Top = (0 - (Text5(0).Height * 18)) + (i * Text5(0).Height)
Text6(i).Top = (0 - (Text6(0).Height * 18)) + (i * Text6(0).Height)
Next
Case 27
For i = 0 To 30
Text3(i).Top = (0 - (Text3(0).Height * 19)) + (i * Text3(0).Height)
Text4(i).Top = (0 - (Text4(0).Height * 19)) + (i * Text4(0).Height)
Text5(i).Top = (0 - (Text5(0).Height * 19)) + (i * Text5(0).Height)
Text6(i).Top = (0 - (Text6(0).Height * 19)) + (i * Text6(0).Height)
Next
Case 28
For i = 0 To 30
Text3(i).Top = (0 - (Text3(0).Height * 20)) + (i * Text3(0).Height)
Text4(i).Top = (0 - (Text4(0).Height * 20)) + (i * Text4(0).Height)
Text5(i).Top = (0 - (Text5(0).Height * 20)) + (i * Text5(0).Height)
Text6(i).Top = (0 - (Text6(0).Height * 20)) + (i * Text6(0).Height)
Next
Case 29
For i = 0 To 30
Text3(i).Top = (0 - (Text3(0).Height * 21)) + (i * Text3(0).Height)
Text4(i).Top = (0 - (Text4(0).Height * 21)) + (i * Text4(0).Height)
Text5(i).Top = (0 - (Text5(0).Height * 21)) + (i * Text5(0).Height)
Text6(i).Top = (0 - (Text6(0).Height * 21)) + (i * Text6(0).Height)
Next
Case 30
For i = 0 To 30
Text3(i).Top = (0 - (Text3(0).Height * 22)) + (i * Text3(0).Height)
Text4(i).Top = (0 - (Text4(0).Height * 22)) + (i * Text4(0).Height)
Text5(i).Top = (0 - (Text5(0).Height * 22)) + (i * Text5(0).Height)
Text6(i).Top = (0 - (Text6(0).Height * 22)) + (i * Text6(0).Height)
Next
Case 20
For i = 0 To 20
Text3(i).Top = (0 - (Text3(0).Height * 3)) + (i * Text3(0).Height)
Text4(i).Top = (0 - (Text4(0).Height * 2)) + (i * Text4(0).Height)
Next
End Select
End Sub
its picture box is getting resize again and again in execution time..
please have a look at it..and if u have an gud idea about it..so plz share/...