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

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

Visual Studio WebBrowser control's PrintPreviewDialog generates "VSHost32.exe has stopped working"

Posted By:      Posted Date: September 29, 2010    Points: 0   Category :.NET Framework

I'm getting a problem with a VS 2008 application when I use the WebBrowser control's .ShowPrintPreviewDialog method and either print or close the dialog box.  I'm working on a 64-bit Windows 7 computer and using Visual Studio's default Debug option settings.  The problem happens both when running from the IDE in debug mode and after compiling in x86 mode as a stand-alone.

The control is central to as an otherwise effective report management system, so on btnPrint_Click I assign HTML code to .DocumentText and then call .ShowPrintPreviewDialog, which works fine, other than it does need 2 clicks so it seems both stages have to happen as separate events? 

Although when I go to print, the document prints okay, the print preview dialog form closes itself and whole program crashes with the above message.  I've also tried separating those stages to avoid the 2-click issue, but I still get the crash.

If I turn Project>Properties>Debug>"Enable unmanaged code debugging" ON, I get this message instead "Unhandled exception at 0x752c77df (urlmon.dll) in PMPos.exe: 0xC0000005: Access violation reading location 0x00000001."

The control's other print dialog methods work fine.   Is there a solution that I can rely on when distributing the application or am I best abondoning this particular

View Complete Post

More Related Resource Links

Where is the Visual Studio 2008 Web Control Library Template


Does a project exist for grouping user controls? Visual Studio 2005 had this template but it does not appear to exist in 2008.

We will be creating several User Controls and would like them grouped accordingly.


Thanks in advance for any responses.

Visual Studio crashes when I try to add a new control

After installation of Microsoft Ribbon for WPF, Visual Studio crashes everytime I try to add a new control to the toolbox What can I do? Solution desperately needed.

AJAX Control Toolkit in Visual Studio

Hello everybody.I want to include AJAX Control Toolkit in my project currently designing of Visual Studio 2008. I found a link Installing AJAX Control Toolkit in Visual Studio 2008 . It is helpful. I want to know anything else shall I have to do for enabling AJAX Control. Is there anything should I write in web.config file or in that .aspx file? I have to submit my project in college so can enabling AJAX Control in that project by including files, create any problem on execution of the project on AJAX Control not enabled machine of my college? Or the reference files will going to be saved in bin folder?Any information will be very helpful to me.Also there is a paragraph in last section of the instruction, here it is :Now we are able to add any of these controls to our web applications. However, we must still remember the ScriptManager, as all of these controls are AJAX-enabled. I don't understand this line "However, we must still remember the ScriptManager, as all of these controls are AJAX-enabled."Thank you.

Getting Content Control on Content Page in Visual Studio


Visual Studio 2010

Working on a content page (.aspx page with associated master page)

Not all of the content place holders from the master page are represented on the content page (have been deleted)

Can go to the master page, find the place holder I want, return to content page and type out the "content" tag.

Is there an easier way? Can I drag a content tag in from a toolbox somewhere? Can I "re-apply" a master page to a content page and have it restore missing place holders? Looking for the lazy way out.

ObjectDataSource Control Disabled/not appearing in Toobox for Visual Studio 2010 SharePoint Project

  1. I've created a SharePoint Project in Visual Studio 2010.
  2. Added Visual webPart .
  3. In the usercontrol of the webpart in trying to add ObjectDataSource control, but this control is not availble in Tool box under Data tab. it appears only if i right click on datatab and select "Show All", but still the ObjectDataSource Control is Disabled and even i cannot drag and drop it on the Webpart.
  4. Also i've created a sample Business Class, with all the mandatory attribute like





Visual Studio 2010 - Design Mode Error - "Error Creating Control"



I am using Visual Studio 2010.  I was debugging a web application and an exception happened and VS 2010 froze.  I ended the VS 2010 in the task manager and when I went back to developing, I found on every form for every ASP.net control I get:


Error Creating Control -

Error HRESULT E_FAIL has been returned from a call to a COM component.


Also I am unable to edit  the form or add anything from the toolbox.


Any help on this matter will be appreciated.





No combobox ajax control visible in Visual Studio 2008 web project


Greetings -

New user to Visual Studio 2008 - one of the reasons for upgrading from 2005 was because I wanted to use the AJAX Toolbox Control for combobox in my web forms. 

Have started a new project, have told it to use .net 3.5 for the project, but when I go to the ajax tooklkit in the toolbox panel there is no combobox.  Could someone please tell me why it isn't there?

Environment - Visual Studio 2008 SP1

Many thanks - OfficeWonk


Composite control in Visual Studio Toolbox


Hi Friends,

I have developed a composite control in framework 2.0. I want when I add reference assembly(.dll) of composite control in any other project, it should automatically be added into visual studio toolbox so that I can drag-n-drop it any time. Currently I need to manually add control from Visual Studio > Toolbox > Choose Items.

Any solution?


Error creating control contentplaceholder1 Visual Studio 2010 design mode


After I imported a VS 2008 web project to VS 2010, I can't view aspx pages that have master pages in design mode. The page design mode displays "error creating control - contentplacehoder1 object reference not set to an instance of an object." The project builds and runs fine though. I have only one master page that all other aspx pages reference and I don't have any nested master pages. Can anybody help me with this? Thanks in advance.

Visual Studio 2010 + Ajax Control Toolkit??? How To?? Anyone??


How does one go about getting the AjaxControlToolkit working in VS 2010 RC1 ??

What version of the tool kit (and or source) should i use??


I downloaded the latest (tool kit only) source and tried to build in VS 2010 RC1 build went fine but when trying to add the tool kit to the Toolbox in VS 2010 RC1 i get the following error:


 There was an error loading types from assembly AjaxControlToolkit\bin\debug\Ajaxcontroltoolkit.dll

Inheritance security rules violated by type:

Ajaxcontroltoolkit.TabContainerDesigner Derived types must either match the security accessibility of the base type or be less accessible.



Ajax Control Toolkit for Framework 2.0 in Visual Studio 2010


I am new to ASP.NET and am using VS 2010 on a standalone machine to develop a web application in framework 2.0. The 3.5 Ajax Control Toolkit I have in my Toolbox tab is greyed out for my 2.0 app, but not for a test 3.5 app, so I am assuming I need to download Tookit just for 2.0 and for VS 2010. I am not sure where to find the right Toolkit. Everything I have found is for 3.5 or 4.0 and/or not for VS 2010. Thanks!


Visual Studio Designer does not display custom control with embedded image



I am developing a custom control which includes an embeded image to display in the design mode of the control. The Visual Studio designer does not display the image of the custom control. Here is the html generated by the overloaded GetDesignTimeHtml() function:


<div style='height:30px;width:215px;border:5;'><input type="text" value="[DropDownListMultiColumn1]" style="height:25px;width:175px;margin:0;padding:0;border-spacing:0;" /><img  src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAASCAIAAAAPCcNlAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAEpJREFUKFNjPHDgAAMh4ODgwABU9x8vaGhoAJkDUQckcYEhqA4tfCA+w+4PuFK493H6FxJYhNWhBeQQDD+sSQHhDyALPyCUPpHkAUdqnQngjlwtAAAAAElFTkSuQmCC" style="height:20px;width:15px;margin:0;padding:0;border-spacing:0;" /></div>


This markup displays as expected within an html form. However, in Visual Studio, it shows a red x where the image should be displayed.

Visual Studio 2005 C# refuses to accept x64 C++ activex control as reference



Firstly: Sorry about my English.


I have many 32bit OCXs, they work fine on x86. But! When I rebuild them on x64, there is an error.

I can not use one of them.

On the developer machine is a Windows xp x64 professional and Visual Studio 2005 sp1.

So, I register the COM control, and after it i can make an instance in ActiveX Test Container (x64) but in VS2005 i can not use this com control. It is not in COM tab page and when i browse the abc.ocx, VS2005 refuses it...

Error message is the next:

A reference to the "...." could not be added.Please make sure that the file is accessible and that it is a valid assembly or COM component.

This contol is a visual control (shows pictures, resize them, ...) and the others are not.

ASP.NET 4 and Visual Studio 2010 Web Development Beta 2 Overview

Many exciting changes for ASP.NET are coming in the .NET Framework version 4. This document gives an overview of many of the new features that are included in the Beta 2 release of the .NET Framework 4 and of Visual Studio 2010.

Visual Studio 2010 Beta 2

This is a big deal. This isn't ".NET 3.6" - there are a lot of improvements of .NET 4, and it's not just "pile on a bunch of features so you get overwhelmed." I've been working with and talking to many of the teams involved and even though it's a cheesy thing to say, this is a really customer-focused release.

ASP 4 - Whirlwind Tour around .NET 4 (and Visual Studio 2010) Beta 1

There's a lot of stuff that's new and added in .NET 4, but not in that "overwhelming-I-need-to-relearn-everything" way. More in that, "oh, this is way easier/simpler now" way. Like, moving data around with ADO.NET DataServices is easy, binding with client templates is easy, there's F# if you need it, the "dynamic" keyword if you need it, Silverlight's already installed, oh, and the parallel stuff will freak you out, but in a good way.
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