Unexpected End of File

C

Chris Pomerantz

Hi,

I've create a Windows Form based application and I'm using the Visio Drawing
Control embedded in a form. I'm doing a specific thing in my app that causes
me to get an "Unexpect End of File" error when trying to retrieve the
bounding box of a shape. The sequence is pretty simple:

Ungroup a group
Catch the ungroup in the QueryCancelUngroup event
Cancel the ungroup and invoke my own ungroup method using BeginInvoke
Do my own ungroup
Look for my own special shapes within the selected items
Tell visio to ungroup
delete my special shapes

The next time I try to execute a BoundingBox on one of the shapes that were
in the group I get the error. This doesn't always happen, but I can reproduce
quite frequently. I'm using C#, .NET 2.0, and Visual Studio 2005. I was
thinking the file may be corrupt in some way, but I can undo and if I drop
more shapes onto the page the problem seems to correct itself. Any ideas?
Could it be some kind of threading issue?

Thanks,
Chris
 

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