We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

VStudio Form Designer Detection

Thread ID:





1485 Nov 4,2002 12:05 PM UTC Nov 12,2002 03:01 PM UTC WinForms 3
Tags: FAQ
Roy Muller
Asked On November 4, 2002 12:05 PM UTC

Does anyone know how to test (with C# code) when the VStudio form designer may be rendering the code? I've got some logging functions that I'd rather not have to keep commenting out whenever I want to revert back to using the form designer. TIA, -Roy

Roy Muller
Replied On November 5, 2002 11:49 AM UTC

I also posted this in microsoft.public.vsnet.ide and received an excellent response from Xin Huang who appears to be from Microsoft. This was his reply: +++++++++++++++++++ When VS.NET starts editing a component in the designer, the ComponentDesigner.Initialize method is called by the root designer. This is the time at which you can tell the component that it is running inside VS.NET designer by setting an internal flag. Depending on this flag, you can decide whether to enable the logging functions. Of course, this requires that you derive a designer for the component. See for more information about custom designers. Regards, Xin This posting is provided "AS IS" with no warranties, and confers no rights. You assume all risk for your use. (c) 2002 Microsoft Corporation. All rights reserved.

Roy Muller
Replied On November 5, 2002 06:57 PM UTC

It seems the URL from Xin's reply was stripped out of my previous post. Also, the subject matter is a bit intimidating for me right now; I need to re-read the article a few times before I try to subclass my own designer ;-) Here's the URL that was stripped: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/custdsgnrdotnet.asp -Roy

Prakash S [Syncfusion]
Replied On November 12, 2002 03:01 PM UTC

Can you not use the Component.DesignMode property? Prakash


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon