AutoCAD Application Window Resize Event.

AutoCAD Application Window Resize Event.

StormyC
Advocate Advocate
821 Views
1 Reply
Message 1 of 2

AutoCAD Application Window Resize Event.

StormyC
Advocate
Advocate

I am probably missing somthing really simple;

 

IIm trying to react to the AutoCAD application window being resized, that reaction is to move a form so that it stays in the bottom right hand corner of the AutoCAD application window.  However, I cant seem to find a way to react to an AutoCAD application window resize event.  It doesnt seem to be exposed..... Anyone help me out?

 

(C# / AutoCAD 2011)

0 Likes
Accepted solutions (1)
822 Views
1 Reply
Reply (1)
Message 2 of 2

StormyC
Advocate
Advocate
Accepted solution

Well it looks like after hours of looking through the object browser I've found a solution and it works flawlessly...

Question is, is this ok to use??


using Autodesk.AutoCAD.Internal.Reactors;

ApplicationEventManager cadWinEvnts =
   Autodesk.AutoCAD.Internal.Reactors.ApplicationEventManager.Instance();

cadWinEvnts.ApplicationMainWindowMoved +=
   new ApplicationMainWindowMovedEventHandler(cadWinEvnts_ApplicationMainWindowMoved);

void cadWinEvnts_ApplicationMainWindowMoved(object sender, EventArgs e)
        {
            //Do Somthing
        }

0 Likes