.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Override AutoCAD form Icon

1 REPLY 1
Reply
Message 1 of 2
SteveHerd
404 Views, 1 Reply

Override AutoCAD form Icon

Hi,
I'd like to display my icon on my C# form. However it appears that the Autocad icon overides mine. Firstly, is that what is really happening, and secondly, how can I override it?
With thanks
1 REPLY 1
Message 2 of 2
Anonymous
in reply to: SteveHerd

Yes, the managed runtime is replacing your form's Icon.

Try something like this:

public partial class MyForm : Form
{
public MyForm()
{
InitializeComponent(); // designed icon is set here

myIcon = this.Icon; // save the designed icon

this.VisibleChanged += MyForm_VisibleChanged;
}

private Icon myIcon = null;

private void MyForm_VisibleChanged(object sender, EventArgs e)
{
if( myIcon != null )
this.Icon = myIcon;

this.VisibleChanged -= MyForm_VisibleChanged;
}

}

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2008
Supporting AutoCAD 2000 through 2008
http://www.acadxtabs.com

wrote in message news:5625720@discussion.autodesk.com...
Hi,
I'd like to display my icon on my C# form. However it appears that the Autocad icon overides mine. Firstly, is that what is really happening, and secondly, how can I override it?
With thanks

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost