I tried your program, works fine on my desktop (IDE and compiled) and on my devices (autoscale compiled) (Qtek9090 WM2003, htc HD WM6.1.
So, could you explain what doesn't work.
- do you get an error ?
- are the context menus not displayed ?
- are the context menus not working ?
- etc
After start shows only panel with scrollbar. Then You must call context menu and select Add Text. On newly created textbox again You must call context menu and select first item. Then program shows messagebox. In this messagebox should be name of textbox which is owner of context menu. But doesnt show nothing.
In contextmenu click sub is code for giving name of textboxt which call context menu.
Sub cmtext_Click
'Dim Source
cmtextobj2.Value=cmtext.Value
cmtextobj1.Value=cmtextobj2.GetProperty("SourceControl")
Source=cmtextobj1.GetProperty("Text")
Msgbox(Source)
End Sub
According klaus demo program, this code show owner of context menu. In klaus demo program works fine. But not in my program. I cant understand why my code dont work (its same code as klaus code).
Klaus' program is returning the text property of the owner control which just happens to be the name of the control in his demo. If you type into your textbox then use the context menu you will see the text you have typed.
To get the name try
Source=cmtextobj1.GetProperty("propName")
This will only work on Basic4ppc intrinsic controls, not those added from a library.