VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



OBJECT LOADER! Using arrays can save a lot of coding, try this object loader as if you are designin

by James Olarte (8 Submissions)
Category: String Manipulation
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sat 14th December 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)

OBJECT LOADER! Using arrays can save a lot of coding, try this object loader as if you are designing objects in array dimensions. It also

API Declarations


''This code requires you the following:
''TargetObject - any object then set the index property to 0
''ObjectLimit (if you want to create 2 additional objects, you need to input 2)
''Interval - give the interval to set the spaces between objects
''MoveTopToBottom - by default objects will be aligned from left to right
'Feel free to use my code for ease of coding.

Rate OBJECT LOADER! Using arrays can save a lot of coding, try this object loader as if you are designin



Dim I%
On Error GoTo ErrorHandler:
    For I = 1 To ObjectLimit
        Load TargetObject(I)
        TargetObject(I).Visible = True
        TargetObject(I).ZOrder 0
        If MoveTopToBottom = True Then
            TargetObject(I).Top = TargetObject(I - 1).Top + Interval
        Else
            TargetObject(I).Left = TargetObject(I - 1).Left + Interval
        End If
    Next I
    Exit Sub
ErrorHandler:
    MsgBox "Error: " & Err.Description, vbCritical + vbOKOnly, "Error " & Err.Number & " in ObjectLoader!"
End Sub


Download this snippet    Add to My Saved Code

OBJECT LOADER! Using arrays can save a lot of coding, try this object loader as if you are designin Comments

No comments have been posted about OBJECT LOADER! Using arrays can save a lot of coding, try this object loader as if you are designin. Why not be the first to post a comment about OBJECT LOADER! Using arrays can save a lot of coding, try this object loader as if you are designin.

Post your comment

Subject:
Message:
0/1000 characters