MaxCADWindow property example

Sub MaxAutoCADWindow_Example()

' This example returns the current setting of MaxAutoCADWindow.

' It then changes the value, and finally resets it it's original setting.

    

    Dim myPrefs As AcadPreferences

    Set myPrefs = ThisDrawing.Application.preferences

    Dim bCurrMaximizedState As Boolean

        

    'Get the current MaxAutoCADWindow state

    bCurrMaximizedState = myPrefs.Display.MaxAutoCADWindow

    MsgBox "The current value for MaxAutoCADWindow is " & bCurrMaximizedState

    

    'Change the state of MaxAutoCADWindow

    myPrefs.Display.MaxAutoCADWindow = Not (bCurrMaximizedState)

    MsgBox "The new value for MaxAutoCADWindow is " & preferences.Display.MaxAutoCADWindow

    

    'Reset MaxAutoCADWindow to its original state

    myPrefs.Display.MaxAutoCADWindow = bCurrMaximizedState

    MsgBox "The MaxAutoCADWindow value is reset to " & preferences.Display.MaxAutoCADWindow

End Sub

 


Bricscad™ is commercialized by Bricsys NV. Bricsys NV and Vondle NV are fully owned subsidiaries of Menhirs NV. © 2001- Menhirs NV - All rights reserved.