Visio Shape Background color using C#

M

Manish

Hi, Can anyone tell me How to change the background color of Visio
Shape using C#. I am using Visio 2003 and Visual Studio 2005. I know hw
to do this using VB 6.0 but donot have any idea by C#. Please help me.
 
M

Manish

yeah...i got the solution for this...
try the below given code for setting the background/foreground color of
any shape using C#:
****************************************************************************
Cell cell=shp.get_Cells("FillForegnd");
cell.Formula="3";
****************************************************************************
Also, try this:
cell=shp.get_Cells("FillbkGnd");
cell=shp.get_Cells("LineColor");
cell=shp.get_cells("Char.Color");
 
M

Manish

Hi Chris...
thanx for the Shape background color topic help...
i have one more problem...

I am using visio drawing control on my C# form. For some days, it
worked fine but suddenly one day, it started showing the below given
exception. However the same application run on another PC absolutely
fine. Can it be Visio licensing related exception..
please help me if you have any idea about it..
***************************************************************************­******************************

One or more errors encountered while loading the designer. The errors
are listed below. Some errors can be fixed by rebuilding your project,
while others may require code changes.

The path is not of a legal form.
Hide


at System.IO.Path.NormalizePathFast(String path, Boolean fullCheck)
at System.IO.Path.GetFullPathInternal(String path)
at System.Reflection.AssemblyName.GetAssemblyName(String assemblyFile)
at
Microsoft.VisualStudio.Design.VSTypeResolutionService.AddProjectDependencie­s(Project

project)
at
Microsoft.VisualStudio.Design.VSTypeResolutionService.AssemblyEntry.get_Ass­embly()

at
Microsoft.VisualStudio.Design.VSTypeResolutionService.AssemblyEntry.Search(­String

fullName, String typeName, Boolean ignoreTypeCase, Assembly& assembly,
String description)
at
Microsoft.VisualStudio.Design.VSTypeResolutionService.SearchProjectEntries(­AssemblyName

assemblyName, String typeName, Boolean ignoreTypeCase, Assembly&
assembly)
at Microsoft.VisualStudio.Design.VSTypeResolutionService.GetType(String

typeName, Boolean throwOnError, Boolean ignoreCase, ReferenceType
refType)
at
Microsoft.VisualStudio.Design.Serialization.CodeDom.AggregateTypeResolution­Service.GetType(String

name, Boolean throwOnError, Boolean ignoreCase)
at
Microsoft.VisualStudio.Design.Serialization.CodeDom.AggregateTypeResolution­Service.GetType(String

name, Boolean throwOnError)
at
System.ComponentModel.Design.Serialization.CodeDomSerializerBase.GetType(IT­ypeResolutionService

trs, String name, Dictionary`2 names)
at
System.ComponentModel.Design.Serialization.CodeDomSerializerBase.FillStatem­entTable(IDesignerSerializationManager

manager, IDictionary table, Dictionary`2 names, CodeStatementCollection

statements, String className)
at
System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.Deserializ­e(IDesignerSerializationManager

manager, CodeTypeDeclaration declaration)
at
System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoa­d(IDesignerSerializationManager

manager)
at
Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader­.PerformLoad(IDesignerSerializationManager

serializationManager)
at
Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader­.DeferredLoadHandler.Microsoft.VisualStudio.TextManager.Interop.IVsTextBuff­erDataEvents.OnLoadCompleted(Int32

fReload)
***************************************************************************­************************

i can also send u the snapshot of the exception if u need...please help
me...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top