With reference to the post by PsycoCoder : Resize Form & Controls For Screen Size - VB6
Public Sub GetLocation(frm As Form) Dim i As Integer ' Load the current positions of each object into a user defined type array. ' This information will be used to rescale them in the Resize function. 'Loop through each control For Each curr_obj In frm 'Resize the Array by 1, and preserve 'the original objects in the array ReDim Preserve List(i) With List(i) .Name = curr_obj .Index = curr_obj.TabIndex .Left = curr_obj.Left .Top = curr_obj.Top .width = curr_obj.width .height = curr_obj.height End With i = i + 1 Next curr_obj ' This is what the object sizes will be compared to on rescaling. iHeight = frm.height iWidth = frm.width
the application breaks at :
With List(i)
.Name = curr_obj
with error 394 - Property is write only

New Topic/Question
Reply




MultiQuote




|