Windows Develop Bookmark and Share   
 index > Windows Forms Designer > DrawGrid and SnapToGrid
 

DrawGrid and SnapToGrid

Hi
Is there a way to set the SnapToGrid and DrawGrid 
properties to false by default. I know that it can be done 
thru VS.Nets Tools -> Options menu. 
But i need to programatically set the above properties to 
false
Actually I have a custom form which will be inherited by 
it's users. So when the user loads the form I want that 
these properties should be false without him needing to 
change it thru the Menu Options everytime.

Regards
Vikas

MigrationUser 1  Tuesday, July 01, 2003 7:16 AM
If you have a custom form that everyone inherits from then you should be able to set the properties in that form and then I believe they should be set for all inheritors.  

Also you shouldn't have to change the Menu Options everytime.  Once that is set for once it should be set for every form that is opened as long as the option has not be overridden in that form.  That is what I do I have my SnapToGrid turned off in Tools -> Options and every form I open has the SnapToGrid turned off(unless it has manually been set for that form).

HTH
MigrationUser 1  Wednesday, July 02, 2003 10:43 PM
Hi

The first one didnt work.
I set the DrawGrid and SnapToGrid as false in my custom form, On deriving a form from mine the drawGrid and SnapToGrid were still true. It seems we have to set it for every form individually as these properties are serialized into the .resx file.
secondly i do not want to allow the user to set it manually thru the menus in  VS.Net.

I am sure this can be done, i think it needs a Designer. 
If u have any sample code do guide me to it.

thanks in advance

Best Regards
Vikas

MigrationUser 1  Thursday, July 03, 2003 1:31 AM

You can use google to search for other answers

Custom Search

More Threads

• Winform standards for UI Design? Help.
• Ctrl - Drag on Design Surface
• Detecting DesignTime vs Runtime issues
• DropDownWidth of ComboBox
• OnDestroyHandle() Question
• Custom control cannot be moved in VS.NET designer
• Have a question about TrackBar?
• To see description in Labels
• Sources of knowledge on Designer Support and Services provided by Net 2.0
• When I open win form app project via VS.NET, controls will be bigger...