Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. How to block shortcuts

How to block shortcuts

Scheduled Pinned Locked Moved C#
winformstutorialquestion
2 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    alexey N
    wrote on last edited by
    #1

    Hi all, I'm using component WebBrowser in my Windows Forms application (Framework 2.0), thus I need to block WebBrowser shortcuts (such as F5). When I set WebBrowserShortcutsEnabled property to false, all shortcuts are blocked, but also it blockes "Delete" key. Is there simple way to block "F5" without blocking "Delete"? Thanks in advance. Best regards, Alexey.

    A 1 Reply Last reply
    0
    • A alexey N

      Hi all, I'm using component WebBrowser in my Windows Forms application (Framework 2.0), thus I need to block WebBrowser shortcuts (such as F5). When I set WebBrowserShortcutsEnabled property to false, all shortcuts are blocked, but also it blockes "Delete" key. Is there simple way to block "F5" without blocking "Delete"? Thanks in advance. Best regards, Alexey.

      A Offline
      A Offline
      alexey N
      wrote on last edited by
      #2

      Thank's for attention ! i've founded solution. It's simple: use of event PreviewKeyDown: private void OnPreviewKeyDown(object sender, PreviewKeyDownEventArgs e) { if (e.KeyCode == Keys.F5) { e.IsInputKey = true; } } Best regards, Alexey.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups