473,406 Members | 2,369 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

How to conditionally compile a form

Hi all,

is there a way to conditinally compile or exclude a Form.
If all the code of a class is from me, i could simply put the conditional
compilition
dirctive around the hole class, but this doesn't work, if the Designer part
is in a file
for itself like in VS2005

thanks
Aug 7 '06 #1
2 1656
Christof Nordiek wrote:
Hi all,

is there a way to conditinally compile or exclude a Form.
If all the code of a class is from me, i could simply put the conditional
compilition
dirctive around the hole class, but this doesn't work, if the Designer part
is in a file
for itself like in VS2005

thanks
Just open the designer generated file and put the conditional
compilation symbols around that.
i.e. press the + button on the form and double click the
MyForm.designer.cs file, add your conditional compilation symbols round
that class and the normal MyForm.cs file.
The designer will leave those alone when rebuilding the class.

Aug 7 '06 #2

"Terry Rogers" <ro**********@gmail.comschrieb im Newsbeitrag
news:11**********************@m73g2000cwd.googlegr oups.com...
Christof Nordiek wrote:
>Hi all,

is there a way to conditinally compile or exclude a Form.
If all the code of a class is from me, i could simply put the conditional
compilition
dirctive around the hole class, but this doesn't work, if the Designer
part
is in a file
for itself like in VS2005

thanks

Just open the designer generated file and put the conditional
compilation symbols around that.
i.e. press the + button on the form and double click the
MyForm.designer.cs file, add your conditional compilation symbols round
that class and the normal MyForm.cs file.
The designer will leave those alone when rebuilding the class.
Hi Terry,

Thank You for the answer.
i tried it and it seems to work, but i'm getting a warning saying the
manifestressourcename
could be wrong.
Any ideas about it?
Aug 8 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: alwayswinter | last post by:
I currently have a form where a user can enter results from a genetic test. I also have a pool of summaries that would correspond to different results that a user would enter into the form. I...
3
by: Nevyn Twyll | last post by:
I have a bunch of test case classes (.cs) files in my executable. For security and bloat reasons, I don't want them to compile into a Release executable - only into a Debug build. How do I...
6
by: Arthur | last post by:
I had two Visual Studio .NET C++ solutions that I combined into one. These project solutions were very similar. In fact, the two solutions were sharing many files. Now that they are one...
15
by: d4 | last post by:
I have a vbscript (below) I want to rewrite in C# but I cannot get it to work (unless there is a better way to do it). The script will combine 2 lines if the (next) line contains a "+",...
2
by: Felix | last post by:
Hello, I use a #define like WITH_MYSTUFF to conditionally compile code within #ifdef WITH_MYSTUFF. I would now like the same define to conditionally link with a library. In the linker settings...
1
by: kaens | last post by:
So, I have a class that has to retrieve some data from either xml or an sql database. This isn't a problem, but I was thinking "hey, it would be cool if I could just not define the functions for...
5
by: henry | last post by:
Basically, my php script runs on my serve all day along. If the php script finds something new, I'd like to get an email alert(which is done) and a cell phone alert, which has to be done through a...
3
by: yasmin | last post by:
I am trying to conditionally compile macros in my c++ program. I want to simply be able to use the macro name without enclosing it in #ifdef-#endif each time. How can I enclose the macro definition...
3
by: Naushad | last post by:
Hi All, I am trying to open the report conditionally from the dialogue box form. In the form there are three field. cboEmployees StartDate EndDate I have used these field in criteria to...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.