You must Sign In to post a response.
  • Category: Windows

    How to get KeyDown event for a Label control


    Please let me know how i can get KeyDown event for Label control.
    Normally label control doesn't have KeyDown event. Is there any way to get this event?

  • #620549

    can you tell me what you are going to do with this keydown event for lablel?

  • #620557
    May be use can use Previewkeydown event :

    private void label1_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
    switch (e.KeyCode)
    case Keys.Down:
    case Keys.Up:

    private void label1_MouseClick(object sender, MouseEventArgs e)

  • #621248
    Dear You can make a textbox look alike label and proceed and complicated codes make future references to the code almost impossible that's my view. regards Dn
    Deepak Negi (Dn)
    PG-DAC, CDAC 2014(3rd Position at Noida Centre)
    M. Sc. (C.S.), B.C.A.
    ASP.NET with C# and MVC 4:: Version 4.5

  • This thread is locked for new responses. Please post your comments and questions as a separate thread.
    If required, refer to the URL of this page in your new post.