How can I scroll through a webpage in the WebBrowser control? - c#

I'm developing an application for Windows CE with Compact Framework 2.5.
The application I'm developing is basically a WebControl. The customer wants the scrollbars hidden (which I have managed), but still wants to be able to scroll through the loaded webpage using the arrow keys on the PDA. However I cannot find a way to control were in the document the WebBrowser currently is?
Does anyone have any ideas? Or a possible alternative to the WebBrowser control, since I have come to the conclusion that the implementation in the Compact Framework is very poor considering the full framework.

Is this a Windows CE or Windows Mobile device?
For windows mobile there are two rendering engines available since AKU 6.1.4: the 'old' PIE and the new IE6 'compatible' engine (http://www.hjgode.de/wp/2013/11/04/windows-mobile-6-internet-explorer-mobile-modes/). The reg key HKLM/security/internet explorer/mshtml value controls the rendering engine used by "Internet Explorer Mobile" (iexplore.exe). The PIE engine display scrollbars by default, the IE6 one not, it can be navigated by the navigation keys. There is a hotfix for compact framework correcting the navigation keys usage: http://support.microsoft.com/kb/975281
If this is a real Windows CE device: if it is a Windows CE 5 based device then there are examples of using the webbrowser control in C/C++ called iesimple etc (AFAIR). Comapct Framework only implements part of the webbrowser API.
It sounds like you are trying to write yet another kiosk mode browser although there are already many out there. Some are device manufacturer dependent, like Intermec Browser, some are usable on generic Windows Mobile devices, like Naurtech Browser (http://www.naurtech.com/products_em.php). These browsers support a bunch of options to control the kiosk mode and usage. I would only write my own kiosk mode browser for simple usage scenarios.
AFAIK there is no way to know from program code, which part of a web page is shown to the user. And it makes no sense to me for a program to know what is currently rendered to the screen. The html and javascript code controls the workflow and data display and change.
There maybe others but the only html engine supporting a SDK beside the MS webbrowser control is ZetaKey. There webkit engine is available for Windows CE/Mobile and they offer a SDK (I do not know there licensing and pricing model). Some open source initiatives have been discontinued, like MiniMo (Mozilla/Firefox).
Please let us know more details about the device and your intention to write your own kiosk mode browser if you need further assistance.

Related

windows c# application for web browser control

I am looking a tutorial for develop a C# application for windows, which can give a extra functionality to the browser controls. i.e. input fields such as input box, text area.
When I using Google+, Facebook, and Twitter also my blog I use my native language. (Sinhala)
My native language has a complexity when is it come to using in computer. it has its own keyboard but it is really difficult to remember. In this case there are some tools to convert English characters in to its phonetic word in my language
i.e.
http://www.ucsc.cmb.ac.lk/ltrl/services/feconverter/t2.html
this above online tool help to convert English character in to is phonetic meaning in my language
i.e. Apal => ඇපල් (Apple)
This tool is developed by University of Colombo School Of Computing SriLanka. That English to Sinhala conversion control by JS.
My requirement is how this get in to C# application and running in particular pc, and when I open my web browser (Firefox, IE, Chrome, etc. ).
It should have run on system background and there should be a system tray icon to on/off it functions on browser (or Short cut key). And when it turn on.
I am wondering how I write a C# app for control Browser inputs and so on.
if you can show me a way to start or If I can have any suitable tutorial, guideline, or code sample, it will be great.
p.s. C# or Java is my prefer language
many thanks
Cheers
Umanda
I would check out the MSDN documentation here for the Web Browser Control. It also provides a sample of the source code at the bottom of the page.
It should have run on system background and there should be a system tray icon to on/off it functions on browser (or Short cut key). And when it turn on.
What you require is a Windows Service, that can be found here.

C# WPF WebBrowser Multi Touch

Hopefully someone can help, I'm having a few issues embedding a web browser into my application to display a Google maps page.
The page loads correctly in the IE Web browser and Awesomium, However we are actually using a Windows 7 touch screen and if I pinch zoom the Google Map the whole web browser zooms in. It doesn't seem to invoke the touch event on the Google Map.
If I browse to Google Maps via IE or Chrome the map support multi touch gestures, using the chrome.exe or ieexplorer.exe (not embedding in the application).
Is it possible to embed the same functionality into a WPF application?
GekoFX seems to support the touch events.
You may consider DotNetBrowser as an alternative. Its heavyweight mode provides support for touch events, and the Google Maps tutorial is available on C# Corner: http://www.c-sharpcorner.com/article/embed-google-maps-in-net-desktop-application/

enable javascript on webbrowser control win ec 7

this is my first post in here.
I searched all over the web for a solution to this problem, but i have not found nothing.
I only read that Webbrowser haven't much support for javascript in win ec7.
But my first question is:
-Why a web page with javascript works fine in IE in wec7 and doesn't work in a webbrowser on the same platform?
I enabled all script options from the control panel, but it still not works.
How can I make the page works in webbrowser as it works in ie?
Thanks in advance for the help or the tips.
bennaloz
Q.
-Why a web page with javascript works fine in IE in wec7 and doesn't work in a webbrowser on the same platform?
A.
The compact framework has a much smaller Operating System than full blown Windows, otherwise it would be too large to fit on the device.
To make the compact framework smaller, many features that Microsoft could not foresee a use for were left off.
When Windows CE and Windows Mobile were first introduced, not many people were trying to use these devices to look at online content. A web browser was included, but a lot of things in this web browser were also limited (for the same reasons). Therefore, some JavaScript may work while other JavaScript will not.
Nothing is guaranteed to work with JavaScript, though.

Google Maps Control for .NET Smart Device Application

I am developing a GPS smart device application with VS 2008 and .NET compact framework 3.5 on windows 6.1 mobile, I wanna to show the current location to the user on windows mobile Form using an interactive google Map control. But I searched a lot for such a control through many sites uselessly can anyone tell me how to find this control or how to do it please ?
GMaps.NET is the best in my opinion:
http://greatmaps.codeplex.com/
Here is a project in codeplex you may try. Download the source code there is no binary for download.
I'm also developing in the same environment and looking at adding navigation to our app. In our case the device will be in a vehicle so we want "Tom Tom" style nav rather than "top down" Google Maps.
We are using Resco controls which are excellent. They have recently released a navigation control that you can just drag on to a form. I'm hoping to evaluate this soon. This stuff isn't cheap but you might want to check out the demo if your project has the budget. Resco are an excellent company to deal with (no affiliation - just that they have made my app look cool and saved me a LOT of work).
http://www.resco.net/developer/mapnavigation/overview.aspx
Cheers
Mark

Windows application using Silverlight

I want to develop a windows based application in silverlight. I went through many articles and every where I found that "Silverlight is for web based application". I don't know whether I am wrong or right, as my superiors told me that in Silverlight5 we can develop Windows based application. Can any body help me to give a clue for how to start. Any help would be highly appreciated.
Thanks in advance
If you mean a Windows based application which can connect with internet you go for Out of Browser application which silverlight supports but if you want simple plain desktop application, there is no point in using Silverlight, WPF would be the right choice in that case.
Look at this article for building an out of browser app using Silverlight.
Silverlight specializes in building rich UI based Web applications and WPF is best for making UI rich applications for Desktop.
You can run silverlight apps "Out Of Browser", its just a setting in the config. Here's a video with more info: http://www.silverlight.net/learn/videos/all/out-of-browser-experiences/
silverlight is a web-based technology that runs on the client machine. it is, basically, Microsoft's version of Flash.
Now, that being said, you CAN write silverlight apps that run out of the browser. but, they are not "really" windows apps. silverlight is a sub-set of WPF. However, you can also make WPF apps that run in a browser. Confused yet?
The bottom line is that WPF is for desktop apps and is full-featured with access to the machine resources.
while silverlight is a light-weight version of WPF that is intended to be run in a browser, similar to flash. it does not have all the features of a full desktop application due to security model and that sort of thing.
Both have elements that cross into the domain of the other.
Like all good things, the answer is "it depends on what you're trying to do". If you want an application that can run inside the browser, outside the browser, plus on Windows and Mac then Silverlight is the answer. You also get for free/are restricted by a security sandbox; you can get around this sandbox by requiring additional permissions from the user. If you're trying to do something that requires multiple monitor support, access to COM objects, stroke/pen/stylus input, 3D hardware acceleration, or access to a large local file store then WPF is probably the better answer. Silverlight out of browser applications also have a nice "phone home" feature that will automatically download updates; WPF requires you to roll this by hand.
Some folks have mention XBAPs (running WPF inside of a browser). Stay away from this error prone steaming pile of stuff. It's good for demoware, but is not something which you'd want to support.
You heard right.
This is called "out of browser":
Silverlight-based applications typically run within Web pages, but you can enable users to install them from the Web and run them outside the browser.

Categories

Resources