Re: Change the Shape's Color

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Is it shape.get_Cells() in C# ?

"Fazoule" <le_maitre@xxxxxxxxxx> wrote in message news:48eb8dbc$1_4@xxxxxxxxxxxxxxxxxx
Yep, i have already checked this site, but it don't work..
i ahve seen this example

Colour Test1: This subroutine will display and change the line colour and the fill foreground colour of all the shapes on the current page.

Public Sub Colour_Test1()
Dim objshape As Visio.Shape
Dim i1 As Integer
For i1 = 1 To Visio.ActivePage.Shapes.Count
Set objshape = Visio.ActivePage.Shapes(i1)
Debug.Print objshape.Name; " "; objshape.Cells("linecolor")
objshape.Cells("LineColor") = 5
Debug.Print objshape.Name; " "; objshape.Cells("linecolor")
Debug.Print objshape.Name; " "; objshape.Cells("Fillforegnd")
objshape.Cells("Fillforegnd") = 4
Debug.Print objshape.Name; " "; objshape.Cells("Fillforegnd")
Next
End Sub

and in C# the shape.Cells doesn't exist..

i think it's a stuf like shape.get_cell(...) ??
but i don't if it's exactly this..
"Paul Herber" <SubstituteMyFirstNameHere@xxxxxxxxxxx> a écrit dans le message de news: cn2ne4ddbfruighpkjplorild7dv3jibob@xxxxxxxxxxxxxxxxxxxx
On Tue, 7 Oct 2008 18:05:47 +0200, "Fazoule" <le_maitre@xxxxxxxxxx>
wrote:

Hi,

I would to know how i can change the shape's Color with C#?

Have a look at John Marshall's VBA page at
http://visio.mvps.org/VBA.htm

The object member names etc are all very similar.


--
Regards, Paul Herber, Sandrila Ltd.
http://www.electronics-packages.sandrila.co.uk/



--
David Parker
Microsoft MVP (Visio)
http://bvisual.spaces.live.com
http://www.visualizinginformation.com

.



Relevant Pages

  • Re: Change the Shapes Color
    ... This subroutine will display and change the line colour and ... Public Sub Colour_Test1 ... Dim objshape As Visio.Shape ...
    (microsoft.public.visio.general)
  • Err.Raise + Call Stack + UserForm
    ... its way back to the top-most subroutine. ... Public Sub Class_Initialize ... On Error GoTo ErrorHandler ... Dim lErrNum As Long ...
    (microsoft.public.word.vba.general)
  • RE: Message appear while Access is thinking/working
    ... OpenMyMessage subroutine. ... I have a form that contains 3 controls, a label, and two ... Optional DisplayStatus As Boolean = False) ... Public Sub MyMessageStatus ...
    (microsoft.public.access.formscoding)
  • Re: Still filename problem
    ... Do I have to declare it in each module or just any module? ... > Public Sub foo() ... > Public Sub bar() ... this subroutine calls another subroutine where I use a similar ...
    (microsoft.public.excel.programming)
  • Re: TextBox Update Problem
    ... 'Display next message in Message Center - this does not work ... Dim objPathOUT ... Public Sub OutPutFolder_Click(ByVal sender As System.Object, ...
    (microsoft.public.vb.general.discussion)