Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / Design Time / April 2006

Tip: Looking for answers? Try searching our database.

VS2003 design-directive changed in VS2005?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Marinus - 29 Mar 2006 10:42 GMT
Hello,

In VS2003 I could use the directive/flag DESIGN in my (C++) code to change
the desinger-behaviour. My code looks like this:

#ifdef DESIGN
... (c++ code during design-time)
#else
... (c++ code during run-time)
#endif

It seems this flag has been changed/removed in VS2005.

Can you help me?

With regards,
Marinus Vonhof
Kevin Spencer - 29 Mar 2006 14:13 GMT
I believe this is what you're looking for:

http://msdn2.microsoft.com/en-us/library/tbt775x3(VS.80).aspx

Signature

HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Show me your certification without works,
and I'll show my certification
*by* my works.

> Hello,
>
[quoted text clipped - 13 lines]
> With regards,
> Marinus Vonhof
"Jeffrey Tan[MSFT]" - 30 Mar 2006 03:30 GMT
Hi Marinus,

I am not sure I understand your problem completely. I am not familiar with
VC++.net, however, can you point me to the document that refers DESIGN
flag?

Based on my experience, #ifdef is the C++ preprocessor directive, which
will only take effect at compile time. So the DESIGN only takes effect at
compile time, if the compiler defined DESIGN flag, "(c++ code during
design-time)" will be generated, but "(c++ code during run-time)" will not
generate at all. Then there is no code to execute at runtime. Also, if
DESIGN flag is defined, no "(c++ code during design-time)" will be
generated in the assembly, so no design-time code to be executed at
design-time. So I am confused by this usage. Can you be clarify? Thanks

In .Net Winform, we usually determine the design-time in code by using
Control.DesignTime property. Does this property meet your need?

Hope this helps!

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Marinus - 30 Mar 2006 08:39 GMT
Hello Jeffrey, Kevin,

Thanks for your reaction.

The DESIGN-flag (in VS2003) is indeed used during compile-time.

I used the flag while switching from form-code to form-designer-layout. Then
the designer (am I using the right terms?) compiles before showing the form.

So the Control.DesignTime property won't help me. The form-object is not yet
initialised when the flag is used.
My question remains simply: is there a new (c++) directive/flag for
compiling in design-mode under VS2005?

Marinus Vonhof

> Hi Marinus,
>
[quoted text clipped - 24 lines]
> ==================================================
> This posting is provided "AS IS" with no warranties, and confers no rights.
"Jeffrey Tan[MSFT]" - 31 Mar 2006 04:22 GMT
Hi Marinus,

Thanks for your feedback!

Sorry, I am not familiar with VC++.net. I do not think I understand it
completely. Can you show me a sample regarding how you use this in
VS.net2003? Also, can you show me the official document regarding this
DESIGN flag?

Thanks

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Marinus - 31 Mar 2006 08:57 GMT
Hello Jeffrey,

This thread will tell you enough, I hope:

http://groups.google.com/group/microsoft.public.dotnet.framework.compactframewor
k/browse_frm/thread/36d84df6ee382ed5/229b48a1fc4963ff?hl=en&lr=&ie=UTF-8&rnum=6&
prev=/groups%3Fq%3Dcompactframework%2B%2523if%2BDESIGN%26hl%3Den%26lr%3D%26ie%3D
UTF-8%26selm%3DeBin9xxRDHA.2316%2540tk2msftngp13.phx.gbl%26rnum%3D6#229b48a1fc49
63ff


Post nr. 4 in this thread explains how I used the DESIGN directive in VS2003.

Best regards,
Marinus Vonhof

> Hi Marinus,
>
[quoted text clipped - 15 lines]
> ==================================================
> This posting is provided "AS IS" with no warranties, and confers no rights.
"Jeffrey Tan[MSFT]" - 03 Apr 2006 10:11 GMT
Hi Marinus,

Still, I need the official document regarding this behavior, then I may
contact the developer team regarding the break-changes.(Yes, if it is
documented in VS.net2003, and it is missing in VS2005, it can be identified
as a break-change).

So, can you show me the the documentation regarding this? Thanks

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Marinus - 04 Apr 2006 16:05 GMT
Hi Jeffrey,

I'm afraid there is no official document regarding the DESIGN-directive,
although it was known by VS2003 users (regarding the Internet-thread).
So it's no break-change, but the directive remains very helpfull.... Maybe
the developer team can still help us.

Best regards,
Marinus

> Hi Marinus,
>
[quoted text clipped - 13 lines]
> ==================================================
> This posting is provided "AS IS" with no warranties, and confers no rights.
"Jeffrey Tan[MSFT]" - 05 Apr 2006 06:24 GMT
Hi Marinus,

Actually I did not know about this flag in winform. Without the official
documentation regarding it, I do not think I can ask the developer team for
the non-documented things.

Anyway, maybe you can submit a request to our product team in the link
below:
http://lab.msdn.microsoft.com/ProductFeedback/

Thanks

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Marinus - 05 Apr 2006 19:26 GMT
Hello Jeffrey,

Oke, I'll do that.
Thanks very much for your efforts.

Best regards,
Marinus Vonhof

> Hi Marinus,
>
[quoted text clipped - 16 lines]
> ==================================================
> This posting is provided "AS IS" with no warranties, and confers no rights.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.