GetPoint() and Custom Cursor

B

Brian

I'm using the ActiveX control in a .Net windows form. We're writing all of the menus and toolbars to make visio control look like it's really our application. It works pretty good so far but there's a few things to tackle that we're a bit perplexed on.

Two things would be really nice if anyone has an idea of how to implement them; I'm sure they're needed in every application.

1. AutoCAD has a very nice GetPoint() method that suspends all activity and waits for the user to select a point (it also handles a bunch of error trapping with some options and also tells you if the user Esc'd out of the selection, etc). Having this allows us to hide a dialog, get a point, then reshow the dialog. I think there's also a select object method does the same thing and returns a selection set (as well as an option for allowing one object or multiple). I can do most of what I need with local variable flags and mouse events but there's a lot of things to keep track of and it's not so straightforward. I've searched high and low through the developer reference and cant' find anything. If anyone knows of something I'd sure appreciate some help.

2. In hoping to create a custom getpoint or getobject routine myself, I am trying to find a way to change the mouse cursor in the ActiveX control so that the user can easily see that a mouse point or object selection is needed. I can change the cursor on the form no problem but when the mouse hovers over the VDC the cursor changed back to what Visio wants. Anyone know of a way I can override this?

Much thanks,
Brian
 
B

Brian

Some more detail on the mouse cursor. I added a button on the form that hosts the VDC (visio drawing control) and declare WithEvents on the declaration of the Visio Application.

Within visApp_MouseMove I put the following two lines of code

visDwgControl.Cursor = Cursors.Cross
visDwgControl.Cursor.Current = Cursors.Cross

I think there's a bug here. If you move the mouse around on the drawing control you can see the cross flash every now and then. It seems like when the cursor jumps and sticks to a grid point it rewrites the cursor again...
 

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