10 Replies - 842 Views - Last Post: 03 October 2015 - 05:47 PM Rate Topic: -----

#1 Omarado   User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 91
  • Joined: 22-September 15

A Problem With My Webbrowser Full Screen Keyboard Controls

Posted 03 October 2015 - 11:06 AM

Hello Guys :)

today i had a new issue in my browser while using it

whenever i load a game in the browser on the INTERNET and the game uses keyboard controls and as long as i am NOT in full screen mode everything works fine and properly but when i select the option to make the game go full screen and i allow the game to do that (from the black box that appears) the keyboard keys and controls don't respond

which means i can play games that use keyboard controls only while in NORMAL mode
because the keyboard keys don't work in full screen mode

although i select to allow keyboard controls from the black box that appears when i switch full screen mode on

is there any code that i can add to fix this problem?!?!?!?!?!

Is This A Good Question/Topic? 0
  • +

Replies To: A Problem With My Webbrowser Full Screen Keyboard Controls

#2 IronRazer   User is offline

  • Custom Control Freak
  • member icon

Reputation: 1536
  • View blog
  • Posts: 3,864
  • Joined: 01-February 13

Re: A Problem With My Webbrowser Full Screen Keyboard Controls

Posted 03 October 2015 - 11:34 AM

How are you setting it to full screen, can you explain or show the code you use to do that?

Are you using the KeyDown, KeyUp, KeyPress, or anything else in your form to capture keys for anything?
Was This Post Helpful? 0
  • +
  • -

#3 Omarado   User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 91
  • Joined: 22-September 15

Re: A Problem With My Webbrowser Full Screen Keyboard Controls

Posted 03 October 2015 - 11:47 AM

i am not using any codes !!!

some games has the option to switch to full screen mode

like a game Happy Wheels which provides a checkbox and whenever i check this checkbox the game switches to full screen

i am not using any code i am talking about full screen mode for games only

and i am not using any keys in the form .....
Was This Post Helpful? 0
  • +
  • -

#4 IronRazer   User is offline

  • Custom Control Freak
  • member icon

Reputation: 1536
  • View blog
  • Posts: 3,864
  • Joined: 01-February 13

Re: A Problem With My Webbrowser Full Screen Keyboard Controls

Posted 03 October 2015 - 12:24 PM

Well, i am imagining it is some sort of bug with using Flash Player through the vb.net WebBrowser. I don`t know a lot about that but, when it is in full screen, it is actually a Flash window that has focus and not the WebBrowser.

On a side note, while doing a search for some info about this, i found something that you may be interested in reading. It is about the Flash player being used to display facebook video`s in the WebBrowser control. Others have had the same problem with them not playing and i guess, you may be able to turn off caching to get the problem fixed with that.

Problems with Flash-content in the WebBrowser control

This post has been edited by IronRazer: 03 October 2015 - 12:25 PM

Was This Post Helpful? 1
  • +
  • -

#5 Omarado   User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 91
  • Joined: 22-September 15

Re: A Problem With My Webbrowser Full Screen Keyboard Controls

Posted 03 October 2015 - 03:21 PM

the code is in this article is no longer supported as i have visual studio 2013 i get errors with the code

can you please find me another link?!
Was This Post Helpful? 0
  • +
  • -

#6 IronRazer   User is offline

  • Custom Control Freak
  • member icon

Reputation: 1536
  • View blog
  • Posts: 3,864
  • Joined: 01-February 13

Re: A Problem With My Webbrowser Full Screen Keyboard Controls

Posted 03 October 2015 - 03:38 PM

I just happened to find that link while searching for answers to this question and figured it might help with your other problem, i did not look at the code but, it appears to be old VB6 code. You can search for answers or information about things like this just as easy as i could.

Google Search with different key words or a question and add "vb.Net" to the end. That usually limits the results to things related to Vb.Net programming.

This post has been edited by IronRazer: 03 October 2015 - 03:58 PM

Was This Post Helpful? 1
  • +
  • -

#7 Omarado   User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 91
  • Joined: 22-September 15

Re: A Problem With My Webbrowser Full Screen Keyboard Controls

Posted 03 October 2015 - 04:02 PM

well i found this code and it solves the facebook problem:

System.Diagnostics.Process.Start("rundll32.exe", "InetCpl.cpl,ClearMyTracksByProcess 8")


i put it in the form1 load then when i navigate to facebook and play a video it plays for the first time but videos after that don't play again

so i restarted the browser again and again the video played for the first time


well i am thinking of putting a timer with 5000 or 1000 or so interval which never stops and put the code above in the timer tick event

will that do it?
Was This Post Helpful? 0
  • +
  • -

#8 Omarado   User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 91
  • Joined: 22-September 15

Re: A Problem With My Webbrowser Full Screen Keyboard Controls

Posted 03 October 2015 - 04:13 PM

actually i tested it out and added a timer with 1000 interval so the code is repeated every 1 second

the browser doesn't stop loading but now it loads slower than before

not very slow but it is a little slower and now all videos on facebook play even without refreshing the page but if there's a better solution i'd appreciate it :)
Was This Post Helpful? 0
  • +
  • -

#9 Omarado   User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 91
  • Joined: 22-September 15

Re: A Problem With My Webbrowser Full Screen Keyboard Controls

Posted 03 October 2015 - 04:21 PM

well actually about loading slow navigating

i figured out that it navigates and loads normally it is just about my brother using the internet for loading a game on the other computer so navigating was a little slow but it is normal and facebook videos play normaly :)

if you have any other suggestions please tell me :D
Was This Post Helpful? 0
  • +
  • -

#10 IronRazer   User is offline

  • Custom Control Freak
  • member icon

Reputation: 1536
  • View blog
  • Posts: 3,864
  • Joined: 01-February 13

Re: A Problem With My Webbrowser Full Screen Keyboard Controls

Posted 03 October 2015 - 04:47 PM

Well, i don`t know because, i have not tried it but, you might be able to add a handler to the WebBrowser`s Navigating event and run that code from there so that it gets run only once each time a browser is navigating instead of calling it over and over with a Timer the whole time the app is running.

In your AddTab sub where you create the webbrowser on a tabpage, you would need to add the handler before calling the WebBrowser.Navigate method.


I have also seen this recommended too. Force a complete refresh of the webbrowser document using the Refresh method in the DocumentCompleted event. Of coarse, you would need to add a handler for the DocumentCompleted event to each webbrowser you create. It forces a 2nd quick reload of the page.
    Private Sub WebBrowser1_DocumentCompleted(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
        If WebBrowser1.ReadyState = WebBrowserReadyState.Complete And Not WebBrowser1.IsBusy Then
            WebBrowser1.Refresh(WebBrowserRefreshOption.Completely)
        End If
    End Sub



You could try these suggestions in a new form project with just a single WebBrowser added to the form. That way you can access the events easily and test both methods without hacking up your original project. If one of them works, then modify your original project. 8)
Was This Post Helpful? 1
  • +
  • -

#11 Omarado   User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 91
  • Joined: 22-September 15

Re: A Problem With My Webbrowser Full Screen Keyboard Controls

Posted 03 October 2015 - 05:47 PM

Many Thanks IronRazer :)

the second suggestion wasn't good as it is very annoying to wait for the page to load then after that it simply reloads again
-_-

i was already bored as i took a lot of time to load faceboo with the second method so i didn't even know if it would fix the videos problems

so i tried your first suggestion and this is the suggestion which actually works :)


i added the code i have given before to the navigating event of the browser after adding a handler for it before the navigate code

now i don't have to do the code every second :)

and now all facebook videos play normaly and the pages loading speed is normal :)

thanks a lot :) but still comtrols won't work in full screen some of them work and some others don't
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1