vb.net + webbrowser/webkitbrowser + collada viewer - vb.net

I am currently working on a vb.net application (winforms) and my task is to somehow import collada files(.dae) files and make them viewable from inside the application.
What worked for me is this: In a simple html5 webpage, I used three.js, colladaloader.js and I was able to view the animation in my web browser.
So I thought I can just import this into the vb.net application using the webrowser/webkotbrowser toolbox component. But alas, what worked in a normal html browser did not inside the application.
The browser that we import in the application doesn't support webgl (even the webkit version doesn't support it).
This is what I get instead of the animation
Again, it works fine inside a web browser like Chrome or Safari, but not IE.
Any help to make this possible in vb.net is highly appreciated.

You will probably have to use a NON-IE based web browser control, see this post:
What is the best web browser control to use on Windows Form Application?
his geckoFX link is outdated I think...
http://webkitdotnet.sourceforge.net/
https://bitbucket.org/geckofx/
This one costs money:
http://awesomium.com/

Related

Does Microsoft UI Automation Framework work with Chrome, Python and Java Apps?

I am working on an automation project, in which I need to capture the activities [ application launched, data entered, input type etc.] user performs on a desktop. I came across Microsoft UI Automation framework which so far works well for native windows based applications like MS Office, .NET apps etc. However I did not find any useful information / samples of capturing the information from different web browsers [Chrome is a must], Python apps, Java Apps etc. Can someone please confirm whether MS UI Automation Framework supports such apps. Any working example to extract user activities from these apps would be highly appreciated. Thanks.
Chrome only supports UI Automation for toolbars, tabs, menu, buttons around the web page. Everything that's rendered as a web page is not seen by UIA.
For the web page content, the easiest way is to use Selenium (driven by the ChromeDriver), which is kind of a de facto standard for browsers, and has nothing to do with UIA.
To test if an app supports UIA, and how far it does, it's very easy, just run UIA's Inspect tool and check the UI tree over that application.
Some additions to Simon's answer...
Chrome page content can be seen by UIA if you run chrome --force-renderer-accessibility. Only for existing Chrome process it won't work. Though user can create a new tab chrome://accessibility manually and enable UIA for all or some chosen pages. This method also works for AT-SPI accessibility technology on Linux. Of course, Selenium WebDriver is an industry standard here. But another way exists. Both Mozilla and IE support UIA by default.
Inspect.exe can be simply downloaded from this GitHub repo.
Regarding Java apps it depends on the app type. Your chances is about 50/50.
WxPython or PyQt5 are good for UIA. TkInter or Kivy apps are not.
P.S. There is an example how to drag a file from explorer.exe and drop to Google Drive in Chrome using Python library pywinauto.
I'm a bit late to the party..
But Chromes accessibility features are only activated once something tries to access it's accessibility.
If you call AccessibleObjectFromWindow ([DllImport("oleacc.dll")]) with the window handle an existing chrome window will have its accessibility activated (and you'll see the actual web page content in UIA!).
If the chrome window is opened after your app is running - Chrome pings open processes for any open accessibility apps... for that you use AccessibleObjectFromEvent and the event you're responding to comes from the windows pipeline: EVENT_SYSTEM_ALERT = 0x0002 .
The bottom line is - you have to tell chrome that there's something installed that wants to access it's web page content.
Oh! and your application has to be signed!! Unsigned apps won't be able to access web content - I think that's the same in firefox too.
I hope this helps someone in the future.
See:
https://www.chromium.org/developers/design-documents/accessibility

Create/embed Firefox/Chrome base browser in Visual Studio

Im creating a freeware application (long live the free community) and I'm trying to add various features that might drive people to use the application such as implementing whatsapp web https://web.whatsapp.com/ into the app so that the user will always have an "always on top" window with their chats rather than everytime having to switch tabs if they're multitasking on their browser.
The problem i am having is that the built in Browser control with VS 2013 does not work with whatsapp web and i get the option to use supported browsers like firefox...chrome...safari.
Is there anyway to make a VB.NET application open an actual chrome/firefox based browser within itself?
I found an article on Gecko Browser...I am not sure if web.whatsapp.com would see this as a firefox browser: http://www.vbforums.com/showthread.php?692005-Mozilla-Firefox-Gecko-Xulrunner-in-VB-NET-%28versions-14-and-up%29
Help appreciated.

Can I change the rendering engine of the WebBrowser control to an older version?

i have an application with a webbrowsercontrol. this webbrowsercontrol is going to load a page that is not compatible with IE9. (cannot change this because its produced by somebody else) By default VB.NET 2010's webbrowser control uses IE9 renderengine, and can run in some sort of compatibility mode. unfortunately even in compatibility mode the page do not work. is there are way to use a webbrowser control with a genuine IE7 or IE8 render engine? thanks
UPDATE
explaining the problem: i have a page with a JAVA applet inside. this java applet has a popup opening with a textbox. this textbox is forced to stay in front until closed. this works fine in IE7 and IE8. in IE9 however if i move the browser window or access any other application this messagebox jumps to the back. and cant be clicked anymore. my webbrowser (IE9 running any emulation) does not work. it beheaves as if it still would be on IE9 even if i emulate IE7 or IE8.
is there are way to use a webbrowser control with a genuine IE7 or IE8 render engine?
Yes, but it requires that you downgrade the version of Internet Explorer that is installed on the computer to version 7 or 8, which doesn't make for a friendly installation experience.
The issue is that the WebBrowser control always uses the version of IE that is installed on the computer because it simply delegates rendering to the native library shdocvw.dll, the same one that is used by IE itself. In your case, that appears to be IE 9. However, by default, it also runs in IE 7 compatibility mode. You can change this by editing the registry, but you cannot change the version of the rendering engine.
And unfortunately, this means you're out of luck, because running multiple versions of IE on a single computer is not and has never been a supported configuration. It can be accomplished for testing purposes, but it requires additional software and the versions don't play nicely together. Certainly not nicely enough for one to support the standalone IE browser while the other drives the .NET WebBrowser control.
Fixing the code to work properly with IE 9 is the best option. IE 9 represents Microsoft's slow progression towards a standards-compliant browser, and although it still has some quirks, it is worth supporting. I know you said that the website code is maintained by "someone else", but I recommend filing a support request with them—their code is buggy and needs to be fixed. If you (or they) need help with this, they can ask some of our code ninjas web standards experts here on Stack Overflow.
Alternatively, you could explore replacing the WebBrowser control with an alternative control. There are several good ones for the .NET Framework, wrapping the rendering engines used by other popular browsers. For example:
WebKit .NET is a wrapper for the WebKit engine, used by Google Chrome and Apple Safari.
GeckoFX is a wrapper for the Gecko rendering engine, used by Mozilla Firefox.
MozNet is an alternative wrapper for Gecko.
Unfortunately, if the code you're dealing with is so badly written that IE 9's feeble attempt at standards-compliance brings it to its knees, it's unlikely that switching to the rendering engine for another even more standards-compliant browser will bring much success.

Create .webarchive in Windows without Safari?

Is there any way to convert a web site to to Safari's .webarchive using Windows and without using Safari?
I know it's an odd request, but I need to create .webarchive files and load them into a UIWebView, and (for various reasons beyond my control) using Safari or Mac is not an option.
I was thinking that Webkit may have some available methods for it, but wasn't having much luck.
Here are alternatives from unrelated questions:
Converting HTML pages to dataURIs
Using HTML5 Canvas to take Screenshots

Simple Desktop Shell for HTML Apps

I am looking for a simple desktop application shell to display an HTML and Javascript application. The web code will be bundled with the app and the app won't need network access. Basically all I need is a window with a webkit view in it I can point to a file on the user's computer.
I thought this would be simple, but I can't find a quick solution to it. What I have looked at so far:
Adobe Air - Fails due to some crazy security choices that break my web framework.
Titanium Desktop - Fails due to some strange page loading sequences that result in dom weirdness.
Chromeless - Looks perfect but discontinued and their download code no longer works.
PhoneGap - No desktop component.
XULRunner - Looks very complex for my needs.
Various others - not cross-platform (I need Windows and Mac), discontinued.
All I want is a simple shell around to display my HTML and run my JS. Please tell me my only solution isn't to use the WebKit view in something like Qt.
Thank you!
See this: http://code.google.com/p/chromiumembedded/
There are also bindings for using this from other languages like Python.
AppJS have served me well in creating desktop shells for html5 apps. I think you should give it a try. It's quite easy to tinker with.