Copy and Paste

  • Thread starter Thread starter YYZ
  • Start date Start date
Y

YYZ

Ok, I've been searching, but I can't find a quick way to implement
this...

If I have a form, and that form has a usercontrol, and that usercontrol
has many textboxes, how can I get what is the active control so that I
can use the clipboard functions on it?

Is there any way to get that information?

If not, does this mean that I have to expose an "ActiveControl"
property on the usercontrol, and update it on every gotfocus event?!?!?

Please tell me I'm missing something easy...please...

Matt
 
Dear YYZ,

You don't have to update the ActiveControl on every gotFocus event, But you
may need to expose a property and so your form can get the existing value of
the ActiveControl from your UserControl.

more info in the following in Documentation,
ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.NETDEVFX.v20.en/CPref17/html/P_System_W
indows_Forms_ContainerControl_ActiveControl.htm


--
Hope this help and welcome to reply the testing result.

Regards
Ken Lin, Kam Hung
Founder and VP of Hong Kong .NET User Group(http://HKNetUG.com)
MCP, MCP+I, MCDST, MCSA, MCSE(NT4 & win2k),
MCSE+I, MCDBA(SQL7 & SQL2K), MCSD(VB6 & .NET), MCAD(.NET)
Microsoft Community Star(Hong Kong & Taiwan)
Microsoft Most Valuable Professional(.NET since 2003)
MCT2004 & 2005
 
Okay, thanks for that pointer. I added my own property MyActiveControl
(bad name...just for now) and in the prop get statement on the
usercontrol I can return a reference to the activecontrol of the
usercontrol.

Thanks for the help!

Matt
 
Back
Top