|
Richard MacCutchan - Excellent
I vote for your
|
|
|
|
|
I learnt it from another person here on CP ... keep it going.
|
|
|
|
|
Thank u for interest, but don' find the source code at any one of the results..................
Can u help me to find that, i really need it at my project, i'm out of date since many days........................................
|
|
|
|
|
What exactly can you not find?! It's bleeding obviously searchable and the download is available on this page[^].
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
How on earth some of these people manage to make a living as developers is totally beyond me!
|
|
|
|
|
|
Hey buddys I was making a POS Software ... and it realy huge size ... & wen i made some changes and want to run it ... it takes lot time ... So I was hoping if there is a way to just compile the modified line of code and then to run it ... I thought it will not compile the hole code again ? is that possible?
|
|
|
|
|
Are you looking for Snippet compiler[^]?
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
|
|
|
|
|
I dont know what it is ... and I followed the link but there is just a picture of some lines of code ... can u tell me briefly please?
|
|
|
|
|
Below that image, there is are download links based on the framework version. Now, instead of compiling you entire project, you can place the lines of code inside that main method in Snippet compiler and run as you would do in the VS.
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
|
|
|
|
|
CoderForEver wrote: I was making a POS Software ... and it realy huge size ..
A single executable? How large is "huge"? Are we talking more than 10 Mb?
CoderForEver wrote: So I was hoping if there is a way to just compile the modified line of code and then to run it ..
Sounds like you want to divide your project into different subprojects. Try and move some of your code to an assembly that can be loaded during runtime. That way you only need to (re)compile the assembly that you're working on, as opposed to the entire codebase.
I are Troll
|
|
|
|
|
the Executable is not huge ... but there are a lot of forms .... in which they contain a lot of buttons and pictures to make our pos system high quality graphics ... so when I i change some line of code ... it debugs the whole program ... but I I want to compile that line of code only and to run it .... I hope u got what i meant...
Thank you for your kind help
|
|
|
|
|
Try to move a form to a DLL, and load it from that assembly. That way you'll only have to compile the assemblies that are actually modified. As an example, add a new class-library to the project. Next, create a form in that class library. Lastly, add a reference from your main-project to the new classlibrary - you'll see that you can access your form and display it within the original project. If you make any changes in the form, remember to recompile the classlibrary too.
Resources like images can also be loaded at runtime
I are Troll
|
|
|
|
|
You have three options:
0) Put the code you want to test into a separate assembly and just compile that assembly (easiest/cheapest way out).
1) Use compiler definitions to omit code from the compile (NOT recommended).
2) Buy some decent hardware - 8gb of RAM, the fastest quad-core CPU you can find, a large SSD (at least 128gb), and a normal SATA drive to put the system swap file on. Finally, use Weven64 for your OS.
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
Another technique is to use the "Edit and Continue" functionality of VS. Set a breakpoint near the code to be modified, when it hits, you can make your edits and when you continue running (or step), the changes are recompiled.
This approach is somewhat limited (i.e. you can't add a new method, alter a try/catch, etc -- the IDE will tell you when you've made a change that requires a full build), but for tweaking procedural code, this is a great technique (and it has the advantage of forcing you to step through the code and make sure it's doing what you expect)
|
|
|
|
|
That's more or less what incremental builds are for, but they are on an Assembly (project) level. If your "huge" application isn't already broken up into several projects, I suggest you do so.
|
|
|
|
|
Thank you everybody ... am working on ur suggestions.
|
|
|
|
|
hi,
im new to windows mobile development on .net.
im using:
visual studio pro 2008;
windows 7
Windows mobile SDK 5.0
On the File menu, i select New->Project. In the Project Types pane on the left, expand Visual C# and select Smart Device. In the Templates pane on the right, select Smart Device Project and click OK. When the Add New Smart Device Project wizard pops up, i select Device Application and click OK.
so i start debugging and ran the emulator. i open windows media player wanting to play some songs. how do i use the media player to open songs from my computer or import the songs from my computer to the emulator?
|
|
|
|
|
|
hi all,
i am having two forms , form1 and form2. Form1 is having 3 labels , i have to fill all these levels from form2. I am calling form2 via form1 . Can someone help me please , how to fill labels of form1?
Thanks,
Vikas
vikas da
|
|
|
|
|
1. If you want to set the text in some event, have a delegate and handle that event in Form1. There you can set the text.
2. Have static properties for the label text and set them in the Form2. Static because then you will not need to pass the current instance of Form1.
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
|
|
|
|
|
its not on some event...when i say ok on form 2 the values shown on form2 should comeback and reflect on form1 and form 2 should be closed after that...
its something like i have a connect button..on click of that button it opening a page and there u can select a database and its instances. when u say ok on the form these values database name and instances should be set on base form where connect button resides.
vikas da
|
|
|
|
|
Have two static properties for label text in your form1. In the OK button click event, set these to the values you want.
In form1,
public static string Label1Text{
get{
return this.label1.Text;
}
set{
this.label1.Text = value;
}
}
In form2, inside OK button click event,
Form1.Label1Text = "some value";
}
}
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
|
|
|
|
|
There are two problems here:
1) Declaring the property as static means it won't compile - static properties have no "this" object.
2) While this method will work with a little tweak, it is not good practice (and it's best to use good practice as early in the learning process as possible, or it gets harder to break the bad habits).
A better way to do it it to signal a "data changed" event from the button form to the label form:
Form 1:
private void Form1_Load(object sender, EventArgs e)
{
Form2 f2 = new Form2();
f2.Changed += new EventHandler(Changed);
f2.Show();
}
private void Changed(object sender, EventArgs e)
{
ChangedArgs ca = e as ChangedArgs;
if (ca != null)
{
label1.Text = ca.strData;
}
else
{
label1.Text = "Fired!";
}
}
Form2:
public event EventHandler Changed;
private void button1_Click(object sender, EventArgs e)
{
EventHandler eh = Changed;
if (eh != null)
{
eh(this, new ChangedArgs("Hello!"));
}
}
Additional:
public partial class ChangedArgs : EventArgs
{
private string _strData;
public string strData
{
get { return _strData; }
set { _strData = value; }
}
public ChangedArgs(string str)
{
_strData = str;
}
}
The ChangedArgs class allows you to transfer all the relevant data Form2 needs to pass to Form1.
All those who believe in psycho kinesis, raise my hand.
|
|
|
|
|
OriginalGriff wrote: 1) Declaring the property as static means it won't compile - static properties have no "this" object.
Correct. Typed here itself so missed out.
OriginalGriff wrote: it is not good practice
May I ask why? I think properties are meant share data between the forms. In case you think exposing controls properties are not a good practice, then I had mentioned use of delegates in my first reply. I would handle the OK button click event in the Form1 and either pass the values through Tag property of the button or would have a property in the form2 which can be accessed in the Form1.
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
|
|
|
|