PC Review


Reply
Thread Tools Rate Thread

NETCFDESIGNTIME

 
 
=?iso-8859-1?Q?Fette_T=F6le?=
Guest
Posts: n/a
 
      31st Jul 2003
I read in some tutorials
(http://smartdevices.microsoftdev.com...rticles/505.as
px) that you can use the compiler directive

#if NETCFDESIGNTIME
some code
#endif

in order to isolate code which is only necessary for the
GUI designer at design time. This means the designer
somehow assumes the NETCFDESIGNTIME constant to be defined
when it processes code.

However, this doesn't work for me, ie. the NETCFDESIGNTIME
constant seems to not to be existant. Is there a special
option to switch this constant on during design time?

Thanks for any help

fette Töle




 
Reply With Quote
 
 
 
 
Neil Enns [MSFT]
Guest
Posts: n/a
 
      31st Jul 2003
It took me a while to figure this out too, Fette. You actually have to add
this define yourself to the project options. In VS.NET open your project and
go to the Project > <Project> Properties menu item. In the Configuration
dropdown select "All Configurations". Click on the Configuration Properties
item in the left pane, then add NETCFDESIGNTIME to the "Conditional
Compilation Constants" option.

--
Neil Enns
Lead Program Manager
Microsoft Mobile Devices Product Group

This posting is provided "AS IS" with no warranties, and confers no rights.

"Fette Töle" <(E-Mail Removed)> wrote in message
news:004501c3576f$257be9d0$(E-Mail Removed)...
I read in some tutorials
(http://smartdevices.microsoftdev.com...rticles/505.as
px) that you can use the compiler directive

#if NETCFDESIGNTIME
some code
#endif

in order to isolate code which is only necessary for the
GUI designer at design time. This means the designer
somehow assumes the NETCFDESIGNTIME constant to be defined
when it processes code.

However, this doesn't work for me, ie. the NETCFDESIGNTIME
constant seems to not to be existant. Is there a special
option to switch this constant on during design time?

Thanks for any help

fette Töle





 
Reply With Quote
 
 
 
 
Chris Tacke, eMVP
Guest
Posts: n/a
 
      31st Jul 2003
It is defined simply in the batch files used for the command-line builds for
making the UI libraries. For all intents, Studio ignores everything inside
the #define.

--
Chris Tacke, eMVP
Advisory Board Member
www.OpenNETCF.org
---
Windows CE Product Manager
Applied Data Systems
www.applieddata.net


"Fette Töle" <(E-Mail Removed)> wrote in message
news:004501c3576f$257be9d0$(E-Mail Removed)...
I read in some tutorials
(http://smartdevices.microsoftdev.com...rticles/505.as
px) that you can use the compiler directive

#if NETCFDESIGNTIME
some code
#endif

in order to isolate code which is only necessary for the
GUI designer at design time. This means the designer
somehow assumes the NETCFDESIGNTIME constant to be defined
when it processes code.

However, this doesn't work for me, ie. the NETCFDESIGNTIME
constant seems to not to be existant. Is there a special
option to switch this constant on during design time?

Thanks for any help

fette Töle





 
Reply With Quote
 
=?iso-8859-1?Q?Fette_T=F6le?=
Guest
Posts: n/a
 
      31st Jul 2003
Thanks for your help.

The problem is that now not only the designer considers
the constants to be set but also the compiler during
normal builds. Consequently, i would have to remove the
constant from the project properties whenever i make a new
build. Not a very elegant solution ... I thought the
NETCFDESIGNTIME constant would only be taken into account
by the designer.

Fette Töle

>-----Original Message-----
>It took me a while to figure this out too, Fette. You

actually have to add
>this define yourself to the project options. In VS.NET

open your project and
>go to the Project > <Project> Properties menu item. In

the Configuration
>dropdown select "All Configurations". Click on the

Configuration Properties
>item in the left pane, then add NETCFDESIGNTIME to

the "Conditional
>Compilation Constants" option.
>
>--
>Neil Enns
>Lead Program Manager
>Microsoft Mobile Devices Product Group
>
>This posting is provided "AS IS" with no warranties, and

confers no rights.
>
>"Fette Töle" <(E-Mail Removed)> wrote in message
>news:004501c3576f$257be9d0$(E-Mail Removed)...
>I read in some tutorials
>

(http://smartdevices.microsoftdev.com...rticles/505.as
>px) that you can use the compiler directive
>
>#if NETCFDESIGNTIME
> some code
>#endif
>
>in order to isolate code which is only necessary for the
>GUI designer at design time. This means the designer
>somehow assumes the NETCFDESIGNTIME constant to be defined
>when it processes code.
>
>However, this doesn't work for me, ie. the NETCFDESIGNTIME
>constant seems to not to be existant. Is there a special
>option to switch this constant on during design time?
>
>Thanks for any help
>
>fette Töle
>
>
>
>
>
>.
>

 
Reply With Quote
 
Paul G. Tobey [eMVP]
Guest
Posts: n/a
 
      31st Jul 2003
Then build separate projects for design-time and run-time.

Paul T.

"Fette Töle" <(E-Mail Removed)> wrote in message
news:0e2d01c35774$cc471820$(E-Mail Removed)...
Thanks for your help.

The problem is that now not only the designer considers
the constants to be set but also the compiler during
normal builds. Consequently, i would have to remove the
constant from the project properties whenever i make a new
build. Not a very elegant solution ... I thought the
NETCFDESIGNTIME constant would only be taken into account
by the designer.

Fette Töle

>-----Original Message-----
>It took me a while to figure this out too, Fette. You

actually have to add
>this define yourself to the project options. In VS.NET

open your project and
>go to the Project > <Project> Properties menu item. In

the Configuration
>dropdown select "All Configurations". Click on the

Configuration Properties
>item in the left pane, then add NETCFDESIGNTIME to

the "Conditional
>Compilation Constants" option.
>
>--
>Neil Enns
>Lead Program Manager
>Microsoft Mobile Devices Product Group
>
>This posting is provided "AS IS" with no warranties, and

confers no rights.
>
>"Fette Töle" <(E-Mail Removed)> wrote in message
>news:004501c3576f$257be9d0$(E-Mail Removed)...
>I read in some tutorials
>

(http://smartdevices.microsoftdev.com...rticles/505.as
>px) that you can use the compiler directive
>
>#if NETCFDESIGNTIME
> some code
>#endif
>
>in order to isolate code which is only necessary for the
>GUI designer at design time. This means the designer
>somehow assumes the NETCFDESIGNTIME constant to be defined
>when it processes code.
>
>However, this doesn't work for me, ie. the NETCFDESIGNTIME
>constant seems to not to be existant. Is there a special
>option to switch this constant on during design time?
>
>Thanks for any help
>
>fette Töle
>
>
>
>
>
>.
>



 
Reply With Quote
 
=?iso-8859-1?Q?Fette_T=F6le?=
Guest
Posts: n/a
 
      1st Aug 2003
Makes sense. sorry for being a little bit dumb.

Fette Töle

>-----Original Message-----
>Then build separate projects for design-time and run-time.
>
>Paul T.
>
>"Fette Töle" <(E-Mail Removed)> wrote in message
>news:0e2d01c35774$cc471820$(E-Mail Removed)...
>Thanks for your help.
>
>The problem is that now not only the designer considers
>the constants to be set but also the compiler during
>normal builds. Consequently, i would have to remove the
>constant from the project properties whenever i make a new
>build. Not a very elegant solution ... I thought the
>NETCFDESIGNTIME constant would only be taken into account
>by the designer.
>
>Fette Töle
>
>>-----Original Message-----
>>It took me a while to figure this out too, Fette. You

>actually have to add
>>this define yourself to the project options. In VS.NET

>open your project and
>>go to the Project > <Project> Properties menu item. In

>the Configuration
>>dropdown select "All Configurations". Click on the

>Configuration Properties
>>item in the left pane, then add NETCFDESIGNTIME to

>the "Conditional
>>Compilation Constants" option.
>>
>>--
>>Neil Enns
>>Lead Program Manager
>>Microsoft Mobile Devices Product Group
>>
>>This posting is provided "AS IS" with no warranties, and

>confers no rights.
>>
>>"Fette Töle" <(E-Mail Removed)> wrote in message
>>news:004501c3576f$257be9d0$(E-Mail Removed)...
>>I read in some tutorials
>>

>

(http://smartdevices.microsoftdev.com...rticles/505.as
>>px) that you can use the compiler directive
>>
>>#if NETCFDESIGNTIME
>> some code
>>#endif
>>
>>in order to isolate code which is only necessary for the
>>GUI designer at design time. This means the designer
>>somehow assumes the NETCFDESIGNTIME constant to be

defined
>>when it processes code.
>>
>>However, this doesn't work for me, ie. the

NETCFDESIGNTIME
>>constant seems to not to be existant. Is there a special
>>option to switch this constant on during design time?
>>
>>Thanks for any help
>>
>>fette Töle
>>
>>
>>
>>
>>
>>.
>>

>
>
>.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:41 AM.