Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21238

[RESOLVED] to check whether the shape control array elelemnt is loaded or not

$
0
0
Code:

Sub displayonmap1(id As Integer, X As Single, Y As Single)
If mapshow Then
    On Error Resume Next
    Load Shape1(id)
    If Not Shape1(id) Is Nothing Then
        Err.Clear
    Else 'End If'    If Shape1(id) Is Nothing Then ' Form1.intsockcnt > Shape1.UBound Then 'And Form1.intsockcnt = idThen
        Load Shape1(id)
        Shape1(id).Container = Pic
        Shape1(id).Visible = True
        pic_centre '  clr pic & load again in centre pf picture box
    End If
    'Load Shape1(id)
   
        With Shape1(id)
            .BorderColor = QBColor(id)
            .FillStyle = 0 '
            .FillColor = QBColor(id)
            .Move X - Shape1(0).Width / 2, -Y - Shape1(0).Height / 2
        End With
End If
End Sub
Private Sub Timer1_Timer()
        displayonmap1 1,1000,1000
End If
Set rs = Nothing
End Sub

I want to check whether the shapeis loaded or not & if already loaded then just move the shape if not then load & move by said x y
can any one hwlp

Viewing all articles
Browse latest Browse all 21238

Trending Articles