Wheel pan and zoom during modal dialog

Wheel pan and zoom during modal dialog

O_Eckmann
Mentor Mentor
693 Views
2 Replies
Message 1 of 3

Wheel pan and zoom during modal dialog

O_Eckmann
Mentor
Mentor

Hi,

 

in some dialog (for example MapClean in Interactive mode) dialog seems to be modal (no other command can be launched) but you can Zoom and Pan with wheel of mouse

MapClean-Interactiv.png

How is it possible to reproduce this behaviour in C#, modal dialog, with possibility to zoom and pan with mouse's wheel?

 

Thanks

 

Olivier

Olivier Eckmann

EESignature

Accepted solutions (1)
694 Views
2 Replies
Replies (2)
Message 2 of 3

fieldguy
Advisor
Advisor

If you want to interact between form and autocad you have to use "modeless".

 

something like this:

 Autodesk.AutoCAD.ApplicationServices.Application.ShowModelessDialog(null, myform, false);

 

There are 5 constructors - you can see them in the Object Browser.  There are several examples in the .NET forum (this post should have been there IMO). 

 

<edit> i don't think you can have both - modal behaviour with view control.  Certainly not without a bunch of overhead ("where's the mouse" code).   

Message 3 of 3

O_Eckmann
Mentor
Mentor
Accepted solution

Hi,

 

thanks for answer. I use modless for some of my dialog, but in this case I want a modal dialog. 

My drawing is 20 cities large (50km*50km) and I need to link records shown in a datagridview to Cad objects.

All record doesn't have a corresponding object. So to avoid implementing a Zoom/Pan button I'd like to use a wheel/pan mouse to find good area corresponding to my record.

I've never used palet but I think it could be the good solution. I haven't enough time for this project to implement this solution.

 

If it isn't possible in a modal dialog, I add a button to hide my dialog during interaction with AutoCAD.

 

Olivier

Olivier Eckmann

EESignature

0 Likes