Welcome to Dream.In.Code
Getting VB Help is Easy!

Join 136,557 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 1,920 people online right now. Registration is fast and FREE... Join Now!




VB 6 form resize

 
Reply to this topicStart new topic

VB 6 form resize, Resize Form & Controls For Screen Size - VB6

Scrip
14 May, 2008 - 05:39 AM
Post #1

New D.I.C Head
*

Joined: 14 May, 2008
Posts: 1

Hi

With reference to the post by PsycoCoder : Resize Form & Controls For Screen Size - VB6

CODE


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
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/2/08 11:23PM

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month