Welcome Guest Search | Active Topics | Sign In | Register

WebBrowser Shortcut Key Crashing Options
Apex Networks Ltd.
Posted: Tuesday, January 12, 2016 9:39:32 AM

Rank: Advanced Member
Groups: Member

Joined: 5/8/2015
Posts: 46
On our webview set up keyboard shortcuts and handle the command event.
We have for example a handler for F9 which evaluates some javascript on the page:

if (webView1.EvalScript("DoF9Pressed();") == null) {
// If this returns null it means that the js method "DoF9Pressed" is not available on the current document
MessageBoxEx.Show(this, "Job Search is not currently available", "Unavailable Option", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}

When you press two keys simultaneously, for example F10 then F9 quickly (F10 is not handled) the whole application freezes completely like it's in a loop.

Can you take a look please, this is the same in the last few builds of EO (we always use latest version).


Regards,
Andy.


Apex Networks Ltd.
Posted: Tuesday, January 12, 2016 9:45:03 AM

Rank: Advanced Member
Groups: Member

Joined: 5/8/2015
Posts: 46
I've done some more digging and it's only F10 that does this. Also to note that if I add an F10 shortcut the application will not run at all?

eo_support
Posted: Tuesday, January 12, 2016 3:04:06 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,229
Hi,

Is it possible that you can provide a test app to us? We tried to use our TabbedBrowser to reproduce this problem but we are unable to reproduce it. Our steps are:

1. Modify the code in NewWebViewItem to change the shortcut key from F11 to F9;
2. Modify the code in WebView_Command to run the code you posted (calling EvalScript and MessageBox);
3. Press F10, hold it, then press F9;

The message box displays correctly. Can you try the same steps and let us know if it works for you?

Thanks!
Apex Networks Ltd.
Posted: Wednesday, January 13, 2016 4:43:10 AM

Rank: Advanced Member
Groups: Member

Joined: 5/8/2015
Posts: 46
Hi,

Just built a test project and sent it to you. The error when trying to register an F10 shortcut is as follows:

System.Exception was unhandled
HResult=-2146233088
Message=F10 can not be used as shortcut because it's used by Windows to activate menu.
Source=EO.WebBrowser
StackTrace:
at EO.WebBrowser.WebView.set_Shortcuts(Shortcut[] value)
at BrowserTest.Form1..ctor() in c:\Users\amarks\Documents\Visual Studio 2012\Projects\BrowserTest\BrowserTest\Form1.cs:line 23
at BrowserTest.Program.Main() in c:\Users\amarks\Documents\Visual Studio 2012\Projects\BrowserTest\BrowserTest\Program.cs:line 17
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:

If I don't register the F10 shortcut it still hangs the test application, press F10 then F9 then F10 again a few times and you'll get it hanging.

Regards,
Andy
eo_support
Posted: Wednesday, January 13, 2016 10:00:14 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,229
Hi,

We have just posted a new build. Please see if it resolves the issue for you.

Thanks!
Apex Networks Ltd.
Posted: Friday, January 15, 2016 3:50:09 AM

Rank: Advanced Member
Groups: Member

Joined: 5/8/2015
Posts: 46
Hi,

I can confirm the latest build fixes this issue.

thank you for swift response.

Regards,
Andy
eo_support
Posted: Friday, January 15, 2016 9:44:10 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,229
Great. Thanks for confirming the fix! Please feel free to let us know if there is anything else.


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.