Active Contributor
27 Posts
2 Kudos
Registered: ‎09-02-2012
Post 1 of 3

Minimizing the AutoCAD Text Window

458 Views, 2 Replies
03-13-2013 09:24 AM

This refers to the AutoCAD Text Window one can toggle by pressing F2.


I found the property that toggles it:

Autodesk.AutoCAD.ApplicationServices.Application.DisplayTextScreen = true; // ... or false

But so far no luck finding how it can be minimized through the API. I went for doing this the WIN API way. It allows you to iterate through the list of opened windows, and to examine the window text (title). There you can find one or more windows whose name stars with "AutoCAD Text Window" and minimize them. Here is the iterator and a loop example, and here is the tip how you can minimize a window. The reason I'm not posting the code is seeing shame in mostly copy-paste work.


TIP: from the looks of things you might need to cast the delegate. The error would give you the name of the class it cannot cast the delegate to. Just copy-paste it between brackets to cast the delegate.


The risk / flaw here is that if another window with such text appears that basically has nothing to do with AutoCAD, you will have chance of dropping a wrong window and not dropping the right one. I guess I am lazy to go after double checking with help of FindWindow, as I would have to do research whether variants of AutoCAD (such as AutoCAD Architecture) use the same class name.


Are these instructions in vain or there is really no way to minimize the window through the .NET exposed API?

*Expert Elite*
1,085 Posts
216 Kudos
Registered: ‎04-27-2009
Post 2 of 3

Re: Minimizing the AutoCAD Text Window

03-13-2013 02:08 PM in reply to: WWFreeman

Just curious: why you must keep the text window minimized instead of closed (when set DiaplayTextScreen to false)?


From usability point of view, whether the text window is closed or minimized, if user want to see it, the user need to press button and click mouse once. And if you have make an opened text screen out of way through your code, what is it that makes you reluctant to close it and have to minimize it?


All AutoCAD user should have know simply hitting F2 toggles the text screen on and off. If your code somehow closes the text screen, user can always opens it by pressing F2 once, which is not much different by clicking icon in task bar to restore minimized text screen (may die-hard command line/keyboard oriented user would even feel pressing F2 key is a lot better than moving mouse to find and click minimized window!).

Active Contributor
27 Posts
2 Kudos
Registered: ‎09-02-2012
Post 3 of 3

Re: Minimizing the AutoCAD Text Window

03-13-2013 08:28 PM in reply to: norman.yuan

Funny you should ask. Last year I watched that guy doing this over and over and asked him about it. No rational response. I can only guess that one was about a subconscious fear the contents would go away if the window was closed.


"Why did the goose cross the road..."


This here is my mere wondering whether there is actual control over this tiny feature.

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Are you interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!