is it a bug

P

prabhu_27_84

ActiveWindow.DeselectAll coding does not work in vb.net application
i am using visual studio.net 2005 and visio 2003
but its working good in visio 200
http://groups.google.com/group/micr...w.DeselectAll+problem&rnum=1#a111a35315a03c36
please help me

my coding:
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button5.Click
Dim document As Visio.Document = AxDrawingControl1.Document
Dim application As Visio.Application = document.Application
application.ActiveWindow.DeselectAll()
End Sub

but its working fine for select all and select
 
C

Chris Roth [MVP]

Hi Prabhu,

That rings a bell in my memory too, but I can't recall exactly what I was
(or wasn't) doing.

Try using the Select method. It's something like this:

win.Select( visDeselect )

You might have to do that for all the shapes in the selection.

Come to think of it, perhaps you could try DeselectAll on the Selection
object instead of the window.

ActiveWindow.Selection.DeselectAll


--
Hope this helps,

Chris Roth
Visio MVP

Free Visio shapes:
http://www.visguy.com/category/shapes
Visio programming info:
http://www.visguy.com/category/programming/
Other Visio resources:
http://www.visguy.com/visio-links/
 
P

prabhu_27_84

Hi Roth,

i tried your coding
ActiveWindow.Selection.DeselectAll
its not working but
win.Select( visDeselect )
is working.i kept it in a for loop and made it look like DeselectAll but
can you give me the correct reason why
ActiveWindow.DeSelectAll() is not working
 

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