Windows Develop Bookmark and Share   
 index > Windows Forms General > Problem with AxFramerControl when display Excel documents
 

Problem with AxFramerControl when display Excel documents

Hello:

I want to use the AxFramerControl to open Excel documents inside a winforms in .net 2.0 framework.

The problem is that the Excel is being display but appears the following message:

Unable to display the inactive document. Click here to reactivate the document.

This is very strange, and the Excel spreedsheet cells content dissapear and when you press the mouse over it, some parts appears and others not and is very ugly.

Appreciate any help

Thanks

Luos

LuisMendoza  Monday, November 26, 2007 1:38 AM
I had the same problem and this is what worked for me (not sure if it's the right way - found it occasionally):

axFramerControl.ActivationPolicy = DSOFramer.dsoActivationPolicy.dsoKeepUIActiveOnAppDeactive;
Yegorm  Monday, November 26, 2007 9:47 AM
We are changing the issue type to “Comment�because you have not followed up with the necessary information. If you have more time to look at the issue and provide more information, please feel free to change the issue type back to “Question�by editing your initial post and changing the radio button at the top of the post editor window. If the issue is resolved, we will appreciate it if you can share the solution so that the answer can be found and used by other community members having similar questions.
Thank you!

Yu Guo â€?MSFT  Friday, November 30, 2007 1:32 AM

I found out what this bug is..


It's so strange, but this bug comes if you declare any new menu items before you declare the activex control.

So if you do this

[code]

Me.MainMenu1 = New System.Windows.Forms.MainMenu

Me.MI_File = New System.Windows.Forms.MenuItem

Me.tbDoc1 = New System.Windows.Forms.TabPage

Me.axFramer1 = New AxDSOFramer.AxFramerControl

[/code]

you will get the inactive message , but if you do this

[code]

Me.tbDoc1 = New System.Windows.Forms.TabPage

Me.axFramer1 = New AxDSOFramer.AxFramerControl

Me.MainMenu1 = New System.Windows.Forms.MainMenu

Me.MI_File = New System.Windows.Forms.MenuItem

[/code]

you wont. Very strange....... It took me a good hour to pinpoint it too.

Vinchenzo12  Thursday, March 20, 2008 2:10 AM

To get more specific.....

I found out thatthe above methods still extremly tempermental if you are going to tie this into a deployment project.

The actual fix that resolves all issues is just make surethe AXFramer referancesareadded prior to any other referances, or anything else is on the form. This resolved my issue and now is working the way it is supposed to.


I have never seen a bug like this before though. Very strange

Vinchenzo12  Thursday, March 20, 2008 6:20 AM
Hai everyone,

When i open a word doc in dsoframer control it works fyn .But after switching windows dsoframer get's inactive it shows a message like "Unable to display the inactive document. Click here to reactivate the document." .What should i do to resolve this issue.




Regards,
Rahul.

.Net Noobler  Thursday, July 23, 2009 4:53 AM
Thanks! I have same problem with you too, Rahul. Any solution for this?
IceFox  Saturday, August 29, 2009 11:09 AM
@ IceFox . I figured out the problem .

Please refer this link .It really works fyn for me....


http://social.msdn.microsoft.com/Forums/en-US/winforms/thread/4c76d418-ca2f-4c74-901b-cde14537756c



Regards,
Rahul
.Net Noobler  Friday, September 11, 2009 11:21 AM

You can use google to search for other answers

Custom Search

More Threads

• WinForm app hangs after few minitues of inactivity
• Prevent Flickering
• Thread question
• CloseReason
• Publishing my application
• MDI List Property in Menu Strip in VS 2005
• MS Access linked to VB 2005 problem
• Batch Commands
• Enter Key used as Tab Key, except when Button Control has focus?
• Question re RadioButton Controls to Function as a Set