Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing Mouse Click
Message
 
To
17/09/2010 16:26:17
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01481672
Message ID:
01481681
Views:
95
This message has been marked as the solution to the initial question of the thread.
>I have an control (container or pageframe) that contains other controls. Over this control is a transparent shape that intercepts all mouse clicks (user will not directly mouse-click on the underlying controls). I want to be able to pass the mouse click to an underlying control when the user presses the Ctrl-Mouse-Click. I know how to test for the control key pressed in the mouse events -- the question is how to determine the object that is underneath the transparent shape at the mouse coordinates? Thank you.

Greg, I think that the last correction of my very confusing message works, at least if I understood your question...
loForm		= NEWOBJECT("form1")
loForm.Show(1)
RETURN

DEFINE CLASS form1 AS form


	Top = 0
	Left = 0
	DoCreate = .T.
	Caption = "Form1"
	Name = "Form1"


	ADD OBJECT pageframe1 AS pageframe WITH ;
		ErasePage = .T., ;
		PageCount = 2, ;
		Top = 9, ;
		Left = 32, ;
		Width = 327, ;
		Height = 169, ;
		Name = "Pageframe1", ;
		Page1.Caption = "Page1", ;
		Page1.Name = "Page1", ;
		Page2.Caption = "Page2", ;
		Page2.Name = "Page2"

	function pageframe1.Init()
		this.page1.AddObject('text1', 'textbox')
		this.page1.AddObject('text2', 'textbox')
		this.page1.AddObject('text3', 'textbox')
		
		with this.page1.text1
			.Height = 23
			.Left = 21
			.Top = 6
			.Width = 100
			.visible = .t.
		endwith

		with this.page1.text2
			.Height = 23
			.Left = 69
			.Top = 48
			.Width = 100
			.visible = .t.
		endwith
		
		with this.page1.text3
			.Height = 23
			.Left = 78
			.Top = 104
			.Width = 100
			.visible = .t.
		endwith
	endfunc

	ADD OBJECT shape1 AS shape WITH ;
		Top = 6, ;
		Left = 26, ;
		Height = 178, ;
		Width = 335, ;
		BackStyle = 0, ;
		Name = "Shape1"


	PROCEDURE shape1.Click
		this.Visible = .f.
		Amouseobj(laObject)

		Messagebox(laObject[1].Name)
		Messagebox(laObject[2].Name)
		this.Visible = .t.
	ENDPROC


ENDDEFINE
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform