c# - Unable to get UserControl name in design mode -
c# - Unable to get UserControl name in design mode -
my code requires command name in user command load event, problem command name in assembly, not name assign in form, if run project command name properly.
to test, add together next code user control
private sub gridx_load(sender object, e eventargs) handles mybase.load msgbox(me.name) end sub
at runtime gives controlname1
at design time gives controlname
how can controlnamex
@ runtime?
to create more clear, add together 2 controls in form, see name of command in design mode same.. unlike in runtime mode..
if add together property user command this:
// note: code in c# public string controlname { { homecoming name; } set { name = value; messagebox.show(value); } }
you compile , add together form, have controlname
property in designer. if alter name in designer, new name shows up. instead of messagebox.show()
want phone call eventhandler, can new name.
c# .net vb.net winforms
Comments
Post a Comment