Re: ContextMenuStrip and PreviewKeyDown

Tech-Archive recommends: Fix windows errors by optimizing your registry



Thanks I'll take a look at it.


""Jeffrey Tan[MSFT]"" <jetan@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:K$yogmbSHHA.2356@xxxxxxxxxxxxxxxxxxxxxxxxx
Hi Dave,

Thanks for your feedback!

Yes, in this little sample project, I did not move the MyContextMenuStrip
code into a separate control, so I just modified the original designer
generated code manually.

In practical using, you may move the code into a separate control, and
once
your control contains a constructor with the prototype below:
public MyContextMenuStrip(IContainer container)

The designer will understand it and generate the code to call this special
constructor:
this.myContextMenuStrip1 = new
ContextMenuStripTest.MyContextMenuStrip(this.components);

The article below provides more details of the context of this
constructor:
"What's that "Windows Form Designer generated code" anyway?"
http://www.codeproject.com/dotnet/disposable_components.asp?print=true

I have also modified the original project to place the MyContextMenuStrip
code into a separate control. I have attached this sample project in this
reply, for your information.

Hope it helps.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to

http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.


.



Relevant Pages

  • RE: Datatable / Dataset Save
    ... If its not too much trouble, could you create a sample project in VB.Net ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.dotnet.languages.vb)
  • RE: Problems with uiAccess = true
    ... Secure locations are limited to the following directories: ... I will wait for your sample project. ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.win32.programmer.ui)
  • RE: InitializeSecurityContext() and Digest in C++
    ... I am using the MSDN Web Client for getting access to these news groups so I ... I will still work with you on your sample project. ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.platformsdk.security)
  • RE: Problem with Process.GetCurrentProcess() when starting a servi
    ... System is Windows XP. ... to send the sample project to me by removing "online." ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.dotnet.general)
  • Re: ContextMenuStrip and PreviewKeyDown
    ... Yes, in this little sample project, I did not move the MyContextMenuStrip ... In practical using, you may move the code into a separate control, and once ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.dotnet.languages.csharp)