Groups | Blog | Home
all groups > dotnet windows forms designtime > april 2005 >

dotnet windows forms designtime : Turn Designer Off


Rick Mogstad
4/19/2005 1:10:24 PM
Is there a way to have a Class that inherits from a control not show the
designer when double-clicked, but just show the code window? The class
cannot be designed, so it doesnt do any good to show the designer. I am
thinking there is probably an attribute for that, but I can't seem to find
it anywhere.

Rick

Henrik E. Rasmussen (no-spam)
4/20/2005 12:24:22 AM
Rick,

you can apply the System.ComponentModel.DesignerCategoryAttribute to the
class with a value of "code" like this (C# syntax):
[System.ComponentModel.DesignerCategory("code")]

Regards
Henrik

[quoted text, click to view]

Rick Mogstad
4/21/2005 6:45:30 AM
Thanks. This does seem to work well, but in VB it seems that you have to
delete the .resx file, or it still goes into design mode sometimes. Its
kind of sporadic when it does it, but without the .resx, it seems to be
working well.

Thanks again.

Rick


[quoted text, click to view]

joeycalisay
4/22/2005 12:00:00 AM
I couldn't see any Code Category for DesignerCategory in the
documentation....

--
Joey Calisay
http://spaces.msn.com/members/joeycalisay/


[quoted text, click to view]

Rick Mogstad
4/29/2005 8:07:07 AM
Thats because it isnt in there.


[quoted text, click to view]

AddThis Social Bookmark Button