DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Mon, 02 Jul 2007 04:13:04 -0700,    posted on: microsoft.public.dotnet.framework.interop        back       

Thread Index
  1    unknown


Prevent embedded Word instance resizing for invisible task pane   
Hi all,

I am using a slightly modified version of DsoFramer to embed a Word
document into a Windows Forms application, but have a strange problem
when trying to protect the document from user input. If I use the
Document.Protect() method to set the document as read only, then press
a key as if to edit it, the document window resizes within the frame
as if a task pane was opening beside it. This leaves a large (206px)
gap on the right hand side of the document with nothing in it except
rendering artefacts because it is never cleared.

I know it is possible to hide the task panes, but there is no specific
event that tells me when one is opened that I can respond to. There
seem to be a few different things that cause the window to resize in
preparation for a task pane, but I would like to completely prevent
this from happening at all rather than having to try and hide the task
pane section whenever it tries to appear.

Is there a way I can prevent this behaviour, either through interop
calls or some other way? If not, is there a way I can handle events
that fire when task panes open so I can close them again?

Of course, failing that, I am looking for a way of viewing a Word
document from within a Windows Forms app in a completely read-only
way. It feels a bit like using an embedded Word instance may be the
wrong way about it - I seem to spend more time turning functionality
off than anything else.

Any help is appreciated,

Thanks,

Craig
Date:Mon, 02 Jul 2007 04:13:04 -0700   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us