Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is there any object here ?
Message
De
25/05/2005 05:41:05
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
25/05/2005 05:31:58
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01017390
Message ID:
01017394
Vues:
27
>>Is there a way to know if any object is placed at a certain location ?
>>For example if I want to place an object ( a shape) at a certain location,
>>i'd like to know if another object occupies the place where I want to put
>>it.....
>>Comments and appreciations about my english are not welcome :-)
>>
>>Alessio
>
>oRef = sys(1270,nX,nY)
>
>However I think it wouldn't be sufficient for you to check a single point. I've some code checking a rectangular area (if I can find it, I'll post:)
>Cetin
*ObjectOverlaps(toObject)
*...
	With toObject
		lnObjTop = .Top
		lnObjBot = .Top + .Height
		lnObjLft = .Left
		lnObjRgt = .Left + .Width
	Endwith
	For Each loObject In This.objCollector.aCollection
		With loObject
			If !Compobj(loObject, toObject) and ;
			   ( m.lnObjBot > .Top  And ;
					m.lnObjTop < .Top + .Height And ;
					m.lnObjRgt > .Left And ;
					m.lnObjLft < .Left + .Width )
				Return .T.
			Endif
		Endwith
        endfor
*...
return .f.
objCollector is from Foxyclasses and provides methods to drilldown to objects in a container (here form).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform