.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

WebBrowser control, svg and WIndows 7

Posted By:      Posted Date: September 27, 2010    Points: 0   Category :Windows Application

Hi, I have a problem with a WebBrowser control using C# 2.0 showing svg content.

The problem is the following:

I have a simple Form with a WebBrowser control in it. the link that i try to load is this: http://www.croczilla.com/bits_and_pieces/svg/samples/arcs1/arcs1.svg (just an example)

If I execute it on Windows XP, the control displays the svg correctly, while on Vista and Windows 7 it shows a blank page... anyone can tell me why?

To show svg I have installed the adobe svg viewer and I have IE8 installed too

Of course if I navigate to that page using directly IE8 everything works.

Thanks in advance for your help


View Complete Post

More Related Resource Links

Possible bug in WebBrowser Control realization in WPF and Windows Phone 7

Hello, I'm tried to make authentication component for russian social network Vkontakte.ru (vk.com). In russian forum nobody answered me. The proplem: When authentication is complete WebBrowser component must be redirected to page like: http://vkontakte.ru/login_success.html#session={%22expire%22%3A%221272008089%22%2C%22mid%22%3A%22100172%22%2C%22secret%22%3A%229c8d8f0305%22%2C%22sid%22%3A%221131703552161ae352a1256402e3140d7cbde41b1602a93d15472c82%22} In Windows Form application all works normal. But in WPF browser was redirected to http://vkontakte.ru/login_success.html Without #session.... It happened not only in WPF Applications, but even in Windows Phone 7. It is a bug? Or this parameter can be accessed from another place?

How to enable own shortcut within WebBrowser control in Windows form application




I am developing a windows form application with C#, where I have placed WebBrowser control... I load some web page in this webbrowser and I need to know, that after I press my own certain shortcut that it will allow me to call my handler...

It should work something like this => I have certain textbox on web page and after pressing my own shortcut, it will call my handler which will automatically type certain text (which will be prepared in that handler) into that textbox... 

Could you advice me, how to make this happen or if it is even possible?


Thanks a lot in advance

Unbound .NET WebBrowser control deactivates Windows Form


In a project of mine, I need to work with unbound WebBrowser controls. The goal is to navigate simultaneously to several web pages, using several WebBrowser controls, and showing the individual pages when the user requests them pressing a button, binding the needed WebBrowser control to a container control in the form to display them.

Problem: Whenever one of the WebBrowser controls loads a page that focuses a control on the page by means of scripting, my Form gets deactivated after document complete if the WebBrowser control is not showing. This only happens with pages that focus an element on load (for example, using onload attribute in body tag but not only).

Reproduce code (using www.msn.com since this site focusses the search textbox after document complete):

In a standard new VB Windows Forms Application (with Form1), drop a button (Button1) in the Form1 designer and this code in the code editor:
Public Class Form1

    Private wb As New WebBrowser

    Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click


    End Sub
End Class

Expected result from running the Application and pressing Button1:
The unbound and invisible WebBrowser control loads the msn page, the form Form1 stays activated.

How to position one control relative to another one even after resizing windows?


I used following Jquery code trying to make image close to a table. It worked fine after first load, but the position changed after window is resized. Any ideas? thanks

$(document).ready(function() {
            var pos = $("#mytable").offset();
            var width = $("#mytable").width();
            var left = pos.left + width + 20;
            var top = pos.top + 200;
                position: 'absolute',
                zIndex: 5000,
                left: left,
                top: top

Cloud Diagnostics: Take Control of Logging and Tracing in Windows Azure


It's difficult to troubleshoot any application without a trail of clues to follow, and cloud apps are no different. We look at how logging and tracing are enabled for Windows Azure, and how you can use Windows PowerShell to manage diagnostics for a running service.

Mike Kelly

MSDN Magazine June 2010

Take Control: Use SharePoint to Manage Your Windows Services


In this article, we show you how to integrate a Windows Services-based solution with SharePoint. The results enable you to provision, start, stop, and remove service instances through SharePoint 3.0 Central Administration.

Pav Cherny

MSDN Magazine April 2009

Access Control: Understanding Windows File And Registry Permissions


Understanding the ACLs that govern permissions and rights before an operation is allowed to proceed is critical to enhancing security.

John R. Michener

MSDN Magazine November 2008

Windows with C++: Windows Vista Control Enhancements


With the release of Windows Vista, C++ developers will be happy to know there's plenty of magic left to perform. This new column will provide the necessary insight.

Kenny Kerr

MSDN Magazine August 2007

Least Privilege: Teach Your Apps To Play Nicely With Windows Vista User Account Control


User Account Control in Windows Vista keeps the OS safe from intentional and accidental configuration changes.

Chris Corio

MSDN Magazine January 2007

Smart Clients: Build A Windows Forms Control To Consume And Render WSRP Portlets


Smart client apps use local resources, provide a rich client experience, and support intelligent install mechanisms. Web services offer powerful interoperability and integration features. Find out how to combine them to develop integrated apps that incorporate data from disconnected sources.

Carl Nolan

MSDN Magazine February 2006

Cutting Edge: A New Grid Control in Windows Forms


Grid controls are essential in many of today's apps. Until now, though, most developers using Visual Basic® have had to buy third-party components to get an effective, easy to use grid component. The Windows® Forms DataGrid turned out to lack too many features for the average developer.

Dino Esposito

MSDN Magazine April 2005

Web-Aware Apps: Build Hyperlinks into Your Client App with the Windows Forms LinkLabel Control


LinkLabels are Windows Forms controls that enable a user to hyperlink to a URL that points to either the Web or the local directory system. While the SDK documentation discusses the control, it does not demonstrate how linking is accomplished, nor does it outline the power and flexibility the control provides. This article fills those gaps, showing how to link using the LinkLabel control. It also shows the flexibility of this control for the programmer using the .NET Framework. In addition, the author covers the large number of properties that allow you to customize your controls and accurately place them. Their built-in behaviors are also discussed, along with their use in both Visual Basic .NET and C#.

Dan Hurwitz

MSDN Magazine February 2003

How to open an excel document in a webbrowser control

Hi,  I have an XBAP app that we would like to be able to open an Excel doc in a WebBrowser control but instead we always get prompted to opne in Excel.  Is this possible?  Here is what I have tried.  The reports are in SharePoint but we want to show them in our own application not SharePoint.       System.Windows.Forms.WebBrowser ReportView = new System.Windows.Forms.WebBrowser();     WindowsFormsHost ReportViewHost = new WindowsFormsHost(); ReportView.Navigate(_fileName,   "_self", postBytes, "Content-Type: application/vnd.m?s-excel"); ReportViewHost.Child = ReportView;   _filename would be something like http://localhost/shared%20documents/myfile.xslsx Thanks for any suggestions. Rhonda

How to check if a Control partially or completely obscured by other windows

In  http://social.msdn.microsoft.com/Forums/en-US/netfxbcl/thread/78289886-f3c1-405b-aaa1-722a23690245 is described how to test if a Window is obscured by other windows. Is there a way to do this wit a single control ?  Using the  GetOverlappedIntersection from the example dosent work. ? I'am not very good in Win32... but Controls implement IWin32Window also - Wht is the difference to Forms ? Thank you
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend