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. problem

problem

Scheduled Pinned Locked Moved C#
helpquestionhtmladobe
3 Posts 2 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.
  • R Offline
    R Offline
    RomanD
    wrote on last edited by
    #1

    I created a web control to display html files on my form. My idea was to click space bar and to go to next file (html, picture or movie) in the folder, but my form looses focus and doesn't pick up the keypress event. I turned on key preview and made a button which should get the focus after the web control displays what it is suppose to diplay. The problem I am having is that when I am playing a movie or a flash file, it won't transfer the focus to the button or to the form. But, if I make a messagebox right after I give button the focus, then the focus is set to the button. How can I fix this?

    D 1 Reply Last reply
    0
    • R RomanD

      I created a web control to display html files on my form. My idea was to click space bar and to go to next file (html, picture or movie) in the folder, but my form looses focus and doesn't pick up the keypress event. I turned on key preview and made a button which should get the focus after the web control displays what it is suppose to diplay. The problem I am having is that when I am playing a movie or a flash file, it won't transfer the focus to the button or to the form. But, if I make a messagebox right after I give button the focus, then the focus is set to the button. How can I fix this?

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      Are your waiting for the HTML document to completely load before you set the focus back to your button? Are you setting the focus inside the DocumentComplete event of the WebBrowser control? RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

      R 1 Reply Last reply
      0
      • D Dave Kreskowiak

        Are your waiting for the HTML document to completely load before you set the focus back to your button? Are you setting the focus inside the DocumentComplete event of the WebBrowser control? RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

        R Offline
        R Offline
        RomanD
        wrote on last edited by
        #3

        I just tried setting the focus to a button in the DocumentComplete event so the form would be able to pick up the keypress event, but still doesn't work.

        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