Replace WebBrowser control in VS2019 with Mozilla browser control (v1.7.12) - html

I have looked at numerous posts that discuss embedding the Mozilla browser control in a VB.NET app, however they were all written many years ago and are incomplete, like: How to create simple browser with Mozilla ActiveX Control with VB.NET?.
I was able to have a little success (display an HTML file with CSS3 and JavaScript) by embedding cefSharp into my VB.NET app, but cefSharp adds hundreds of MB. One of the posts said they believed that the Mozilla browser control (v1.7.12) was an exact replacement for the VS 2019 .Net web browser control, but there was no information on how to make the switch. Please advise if the Mozilla browser control is a good alternative, and if so, point to a tutorial or other information for making it work...or is there another choice?

You must use 3rd party library for this. You can use either GeckoFx for Firefox engine, or CefSharp for Chrome engine.

Related

VS Code Inspect Elements

I have been using Adobe Dreamweaver (2005) for doing web development. I recent switched to VS Code. Dreamweaver has a built in browser where I can inspect a HTML element and it will find it in the editor immediately. This comes in really handy especially when I'm working on messy projects that have been evolving for years. I really like a lot of things about VS Code but this feature is important in saving me a lot of time. Is there any way to get this feature in VS Code?
Thanks
The feature you're looking for is now built into every major browser in the form of dev tools: https://developers.google.com/web/tools/chrome-devtools/open#elements
You can simply click on an element, and in a separate pane, you will be shown the corresponding code.
You can also link DevTools directly to VS code via the extension debugger for chrome in the VS code marketplace - or debugger for Firefox, etc.
However, I recommend starting with the browser dev tools if you're not familiar with them already, as they are simple to use and require no configuration.

Reading Web Pages with Visual Basic 6

I want to create a Web Browser with Visual Basic 6. The only possible way I found to create this is using 'Microsoft Internet Controls' ActiveX plugin (WebBrowser). But, it is using Internet Explorer to show pages. I don't like it. I want to show the Web Pages in a modern, well designed way. So, I am going to create a program which can read and display HTML, CSS, JavaScript, PHP etc. Is it possible to do that with only using Visual Basic 6?
MS Internet Controls I am currently using:

How do I get rid of the sidebar and toolbar when embedding a pdf in an html file?

Trying to embed a pdf on my website like so:
<iframe src="filename.pdf" type='application/pdf' frameborder="0"></iframe>
The website is a rails site, and currently I'm only running it on a local server.
The problem is that the pdfs render with a toolbar on top and a sidebar with my adobe creative cloud account information, as seen in the picture below (the actual content of the pdf displays in the white box under the toolbar and to the left of the sidebar)
How can I get the pdf to render alone, without the menu and sidebar?
If you allow the browser to choose how the PDF gets rendered, you're never going to be able to create a consistent experience for your users unless you are in a controlled desktop environment.
If you are looking for a consistent experience, use pdf.js to render the PDF in the browser.
If you are in a controlled environment and all of your users have a browser/viewer combination that will let the browser show PDF using the Adobe Reader plugin (as your screen shot shows) then you can use the "open parameters" at the end of the URL to control what gets shown. See the documentation at the link below.
http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/pdf_open_parameters.pdf
That said, don't count on that solution to work for very long. Most modern browsers are not allowing the viewer plugins to function anymore and the rest are moving in that direction.
Searching more into stack, try that:
https://stackoverflow.com/a/2105095/7741129
For more detailed informations:
http://blogs.adobe.com/pdfdevjunkie/web_designers_guide
I think it's better use some kind of JS stuff just in case of cross-browser issues, like related into first link. Solutions like https://pdfobject.com/ it's helpful to get the job done. Look:
PDFObject 2.0 detects browser support for inline/embedded PDFs. (In
case you were wondering, your browser supports embedded PDFs. You
lucky dog, you!)
If you're working with dynamic HTML, such as a single-page web app,
you may need to insert PDFs on-the-fly. However, PDF embedding is not
supported by certain browsers. If you insert markup without first
checking for PDF support, you could wind up with missing content or a
broken UI.
The PDFObject utility helps you avoid these situations by detecting
support for PDF embedding in the browser; if embedding is supported,
the PDF is embedded. If embedding is NOT supported by the browser, the
PDF will NOT be embedded.
By default, PDFObject 2.0 inserts a fallback link to the PDF when the
browser does not support inline PDFs. This ensures your users always
have access to your PDF, and is designed to help you write less code.
The fallback link can be customized, or the option can be disabled if
you prefer.
PDFObject 2.0 is npm-ready. Modern web apps use npm to manage packages
and dependencies. PDFObject 2.0 is registered with Node Package
Manager (npm) and can be loaded dynamically.
PDFObject also makes it easy to specify Adobe's proprietary "PDF Open
Parameters". (Be warned these parameters are only supported by Adobe
Reader, most PDF readers will ignore the parameters, including the
built-in PDF readers in Chrome, Internet Explorer, and Safari. Read
more below.)

Any specific tools to development the application using HTML 5

Any specific tools are there to develop the application using html 5?
I had used Aptana studio, I feel it is not fully user friendly tool to write a html 5 application.
http://marakana.com/bookshelf/html5_tutorial/index.html take a look at that for starter points.
This is a great, easy to read tutorial which will almost definitely help you learn HTML5 and CSS - http://net.tutsplus.com/articles/news/30-days-to-learn-html-and-css-a-free-tuts-premium-course/
For debugging, you can use Chromes developer tools (F12 on the keyboard) or the same on Opera & Internet Explorer. For Firefox download "Firebug".
Another "debugging" tool is http://html5.validator.nu/ which will validate your HTML and show any errors.
Notepad++ is a great free app to start developing HTML5 on, you can also use others, for example Aptana is a great IDE. For one with a GUI, I'd advise purchasing Dreamweaver, it is expensive but I say it's the best for learners.

Plain Html and javascript execution offline

Can HTML and javascript run offline like an application? I'm looking to running the webpage offline like silverlight OOB applications. But if the browser closes, I want some way to run the webpage again without going online. Is this possible?
The HTML 5 draft introduces mechanisms for a webpage to be used as an offline application although, obviously, as a recent draft spec this isn't supported by all browsers.
You can also File > Save As and just save an HTML file and its associated JS locally.
Google Gears provides the kind of functionality that you're looking for. Google themselves are planning on phasing it out in favour of HTML5's draft (see David's response) but I think you will find Gears more mature [for the time being, at least], and (perhaps importantly, if you're considering redistribution) more consistent across different browsers.
[Further edit:] The Adobe AIR runtime allows you to run HTML and JavaScript applications on the desktop.