Suggestions for creating a windows XP-compatible browser? - c#

For my internship, I need to create a customized browser that will host their web application and simulates it to be like a normal desktop app for the user.
I've already looked at a few possibilities to help me create a browser without having to write the engines myself and this resulted in creating small prototypes for Electron, CefSharp, and Geckofx, these last two were done in c# WinForms, where the default webbrowser control was replaced by a chromium engine and the firefox engine Gecko in the case of Geckofx).
These prototypes seemed to work perfectly with the site and looked very promising, however since making these demo's I got the requirement to support Windows XP as well. This requirement has complicated things because none of my already available options support Windows XP as of now.
Which brings me to my question, are there any packages like Cefsharp and Geckofx that are embedded into c# (via Visual Studio NuGet) and available to be used on Windows XP without breaking?
The webapp I'm creating this for fully supports internet explorer 11, Chrome version 50+, Firefox (don't know the first supported version) and Microsoft Edge.
It also seems to work with Opera version 36 (which is the last available version for XP) but I haven't found any kits that can help me create a browser-based on this.
Edit 18-01-19:
I was asked to also support Windows XP because the company I work for has a lot of customers that are hospitals. Apparently, they mostly use Windows XP to support the other programs they have installed on their desktops and as such I got the requirement to make my browser support XP as well.
It is also worth noting that the webapp I'm making this for, is currently used on a local environment and accessible via localhost in a browser. So the security concerns are not the main problem here as far as I'm aware of.
Edit 22-01-2018:
It seems that the current version of Geckofx (v45) is still able to work with Windows XP, it does, however, need the .Net framework 4.0 to work, so you'd have to downgrade to that version whilst developing. However, when I try this out I miss certain dependencies that make it impossible to use.
When reinstalling the NuGet version on .net framework 4.0 the references to Geckofx-core and geckofx-WinForms disappear, along with a few others that I haven't been able to pinpoint. Because of these lost dependencies, I'm unable to support XP with the Geckofx browser and I haven't found any good replacements for it.
The error I'm getting right now after "Xpcom.Intialize("Firefox"); is 'System.EntryPointNotFoundException: cannot find entry point with the name NS_Alloc in DLL xul' which causes the program being unable to start.

Related

How do I release an Office Add In to the Windows Store

I've created an office add in using Visual Studio 2015. The add in works perfectly with MSProject in debug mode.
I've published the add in following the instructions here. So far so good.
Now I'd like to release it to the Microsoft Windows Store. I've logged into the Seller Dashboard and I pretty much fall at the first hurdle.
It asks for the app package manifest file. TBH I'm not sure which file it wants exactly, so I tried
xxx.OfficeAddin.vsto file in the root of the "publish" directory
xxx.OfficeAddin.dll.manifest in the publish/Application Files/xxx.OfficeAddin_1_0_0_2 directory
xxx.OfficeAddin.vsto
also within the publish/Application Files/xxx.OfficeAddin_1_0_0_2
directory
I assume it wants No2 but it didn't work so I tried them all. None of them work and all result in the same error:
Your manifest does not reference any supported Office Add-in namespace. The most recent version is http://schemas.microsoft.com/office/appforoffice/1.1.Learn More
Googling this error in quotes returns nothing, without quote - a load of unrelated results.
I'm completely stumped now - has anyone managed to do this?
You cannot add VSTO desktop applications to the Windows store, but may be able to do so soon.
The Windows Store was designed for installing applications that would run in private sandboxes that would keep apps isolated (in case of issues) from your operating system and other applications. However, Desktop applications often have registry entries, dll dependencies, and other client-side requirements. Because the Windows Store cannot accommodate these OS-related and client-side requirements, desktop applications cannot currently be distributed via the Windows Store
Fortunately, Microsoft is finally addressing this issue. They are in the process of finalizing Project Centennial, which will allow one to convert desktop apps for distribution via the Windows Store. It does this by providing a separate registry for desktop apps and a way for dlls to function without hurting other applications.
As of this writing, Microsoft has withdrawn the preview version of their Project Centennial Desktop App Converter. I am hoping this is in preparation for releasing a stable version.
Will Project Centennial allow VSTO add-ins to be sold via the Windows Store? I am hopeful, but this is not certain. We should know more within the next couple of months, if not sooner.
Update: June 8, 2016
At Microsoft's dotnetConf 2016 John Sheehan stated that VSTO add-ins would not be supported in version 1 of Project Centennial. He added that plug-ins (his term) that leveraged other desktop technologies would be able to be converted by the Project Centennial Desktop App Converter some time after Project Centennial's initial release (now slated to be concurrent with Window 10's 1st anniversary release in July 2016). Mr. Sheehan did not elaborate on whether VSTO add-ins would specifically work with later versions of Project Centennial, but he did indicate that compatibility with software that leverages other desktop technologies is definitely on the Project Centennial road map.

Can i use Trident 6.0 in Windows Forms App C# (.NET 4.0)

Trident (also known as MSHTML) is the name of the layout engine for the Microsoft Windows version: http://en.wikipedia.org/wiki/Trident_(layout_engine)
I wanted to know how or if i can use Trident version 6.0 (IE 10 equivalent) in C# Windows Forms Application (.NET Framework 4)
EDIT: I wanted to implement WebSockets and local storage for my Windows Forms App. And i need new trident for that i guess.
You can use the WebBrowser Control to show html to your end users. I suppose that the rendering engine will depend of the installed version of IE.
http://msdn.microsoft.com/en-us/library/w290k23d.aspx
You'll need to use the WebBroser class. I found that to force the engine version used to render in your app you should update FEATURE_BROWSER_EMULATION registry key for IE. Check this article for reference. There is also article on MSDN with all allowed values.
Of course mashine running your software should have this version of IE installed.
EDIT:
I found old article on CodeProject that may be helpfull. As far as I understand, you can include needed DLLs with those commandline commands:
aximp c:\windows\system\shdocvw.dll
tlbimp mshtml.tlb
However, I have not tested this, so you can give it a try and tell if it works or not.

Cross platform development, GUI and Database - c#

Forgive me for asking a common question, but I couldn't quite get what I needed from what I found so far.
First question - SQLite. I am using this DB as in my C#.NET 3.5 windows service and it works great, I was looking for a portable solution, because I would like port my service to a linux daemon etc, using Mono, which seems to support it. However, I am not sure how to implement this. I had thought the dll was compatable, but it seems there is a seperate dll for Mono/.NET which I should have expected. Does this mean I need to seperately code/compile for each platform or is there something that would allow me use of SQLite with the same code on various platforms? I have encountered this a few times in my searches, csharp sqlite, a "reimplementation". To be honest, this is quite new to me, is it of use? The Mono SQlite page says that they Mono.Data.Sqlite code is based on System.Data.SQlite and goes on to say...
"We have chosen this way as means to
provide a migration path for
developers using SQLite in their .NET
applications"
Are they referring to creating a new, seperate binary? Or could I run my code as is with some adaptation?
Second question - GUI. As far as I can tell the two main options for cross platform dev in .NET would be GTK# and Winforms. Again however, its the specifics of implementation that are a bit hazey. Can I create a win forms GUI in visual studio as I normally would then easily migrate this using mono? Or should I develop this in something like X-Develop or MonoDevelop?
Many thanks for your advice/patience :D
To help out a little bit here I used the full mysql dll file that was provided and I was able to compile my program on windows using visual studio, and then deploy it to Linux without changing anything(except the case of the mysql dll file, which is kind of annoying you'll see what I mean at some point).
Also from what I've heard winforms isn't totally supported by mono yet, but I may be wrong. I haven't done a gui cross platform yet, but I would test winforms first, just so you could develop it in visual studio, and if that doesn't work I think GTK should be fine.
You just need to make sure that the dll's are compiled for .net 3.5 or below and you should be fine(90% of the time).
Check this out here, http://www.mono-project.com/MoMA and also the link that chris provided.

.NET 4 Program written/compiled on Windows 7 machine won't run on XP

I have an app that I wrote using C# .NET 4.0 in Visual Studio 2010 on my Windows 7 Ultimate machine. This app works fine on both Vista and other Windows 7 computers, but whenever someone running Windows XP tries to run it it crashes.
In order to reproduce this I've tried running it on my Win XP VMWare machine and it crashes for me in there. Unfortunately it doesn't give me any specific error, just informing me that the program has crashed and needs to close.
One other user sent me the following:
Run-time error '339'
Component 'vbalSGrid6.ocx' or one of its dependencies not correctly registered: a file is missing or invalid.
Code 0xe0434352
Flags 0x00000001
I don't get that particular bit when I try to run it on my Virtual XP machine, and I also made sure to install .NET 4.0 on there.
What could be causing this, and why won't the app run in XP if the .NET 4 framework is supported for XP?
Components used in the program: DataGridView, ComboBox, Buttons, Labels, LinkLabel, NewtonSoft's JSON parser, and that's about it.
I am baffled and have utterly no idea where to start. Ideas?
UPDATE: Hmm, tried running my other recently created application on XP and it loaded fine. The only major difference (in the components I used anyway) between the two is my use of NewtonSoft's JSON library, which I actually think is a .NET 3.5 component.
UPDATE 2: Just for kicks I tried running the program on my Wind7 machine in "Windows XP SP3" compatibility mode and it ran fine. Of course, I have no idea just how closely the "compatibility mode" emulates a true XP SP3 environment, but I figured I'd give ya'll the info anyway.
¡¡ IT WAS THE APPLICATION ICON !!
I kept noticing that the module it referenced in the error it gave me was system.drawing which I thought was odd. I figured perhaps the PictureBox I was using was causing the issue, so I tried disabling everything to do with that, to no avail.
I had my business partner set up his XP box so that we'd have another machine to test with aside from my VMWare XP box just in case there was some odd issue with it.
After he got it set up and the app copied over he said "The icons look like DOS ones" and I had a eureka moment.
I was using .PNG's as the icons because they support transparencies and whatnot, but XP doens't natively support them. So when the app was copied to the desktop it just used a generic icon for it, and when the application was run it crashed because XP doesn't know how to render a .PNG.
Try using the Fusion Log Viewer to debug startup errors in .NET applications.
Scott Hanselman has written a nice howto along with links to further resources if you need to go deeper.
Are we sure this is some wierd .NET compatibility issue or just a run of the mill bad installer/deployment problem?
Here's one user who has that error message because the OCX DLL was copied to System32 with a shortname. Renaming the DLL to the correct name and running RegSvr32 resolved his problem.
Do you have an installer? Have you correctly identified all of your managed and unmanaged dependencies and properly authored them into your installer?
http://forums.elmsoftware.com/forum_posts.asp?TID=119

Tablet PC Autocomplete

I have been trying to implement the autocomplete functionality mentioned
here.
The problem is I am developing on a windows xp machine and I cant seem to find the right dlls used to develop this feature.
Using vista for development is not an option, but the production environment is on a Vista Tablet PC. I have downloaded and installed the Tablet PC SDK version 1.7 to no avail (still cant find the libraries).
The implementation seems to use COM libraries. The examples are all written in C++ and I am developing in .NET.
Has anyone ever successfully implemented this feature?
If so, how did you go about doing it?
Any help will be appreciated
Here is an image showing what I am trying to achieve
alt text http://i.msdn.microsoft.com/ms695043.ba59a513-e538-4092-89a6-6d691424dc3d%28en-us,VS.85%29.jpg
There is no need to call the DLLs directly. As long as your solution is based on .NET Framework 3.0 or above you just need to enable AutoComplete mode on the specific textbox. Deploying your solution to Vista should enable the functionality.
However, one caveat is that the autocomplete integration is for Vista and above only. You will therefore be unable to debug this aspect of your project on an XP machine - you'll have to remotely debug on your Vista Tablet PC. The Tablet PC SDK does not include down-level compatibility for this option on XP as it's baked into the Vista OS.
I hope this helps.

Categories