- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello~
I study dotnet.
so, I referenced "AutoCAD .NET Developer's Guide".
but, I have a problem. I don't know why.
below code has Error.
below code copied from "AutoCAD .NET Developer's Guide".
please help me.
using System;
using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.Windows;
using Autodesk.AutoCAD.Runtime;
using System.Drawing;
namespace ClassLibrary1
{
public class Class1
{
[CommandMethod("MinMaxApplicationWindow")]
public static void MinMaxApplicationWindow()
{
// Minimize the Application window
Application.MainWindow.WindowState = Window.State.Minimized; //Error
System.Windows.Forms.MessageBox.Show("Minimized", "MinMax",
System.Windows.Forms.MessageBoxButtons.OK,
System.Windows.Forms.MessageBoxIcon.None,
System.Windows.Forms.MessageBoxDefaultButton.Button1,
System.Windows.Forms.MessageBoxOptions.ServiceNotification);
// Maximize the Application window
Application.MainWindow.WindowState = Window.State.Maximized; //Error
System.Windows.Forms.MessageBox.Show("Maximized", "MinMax");
}
}
}
Solved! Go to Solution.