In a .net form, I could have controls directly on the form or user controls I've created. Is there a way, from a reference to any particular control, to determine the class that instantiated the control?
Basically the .net equivalent of instantiating-procedure.
Thanks,
Tom
wouldn't the debugger give you a decent call stack?
In limited testing, I believe what I've posted below works. This is the trigger method that gets called.
METHOD PRIVATE VOID onMouseDoubleClick(INPUT sender AS System.Object, INPUT e AS System.Windows.Forms.MouseEventArgs): IF e:BUTTON = System.Windows.Forms.MouseButtons:RIGHT THEN DO: DEFINE VARIABLE objControl AS System.Windows.Forms.Control. objControl = CAST(sender, System.Windows.Forms.Control). MESSAGE "Clicked on: " objControl:NAME SKIP "Object Type: " sender:ToString() SKIP "In Container: " objControl:GetContainerControl():GetClass():TypeName SKIP "In form: " objControl:FindForm():GetClass():TypeName VIEW-AS ALERT-BOX. END. END.