|
Hello
Right Click on your Setup projects name in solution Exploere => Properties => Settings => Prerequisites => Check .Net FrameWork => From the radio buttons below check "Download from same location as my application"
Regards
|
|
|
|
|
Is there any method for creating a new .net solution from any other .net solution and we can add all the referenced DLL's projects and all kind of stuff in such a manner that when u visit that new solution u should be able to directly build the software.
In short my need is that there are different componets available and i have to create a new solution using this different components(projects).
Plz answer as fast as possible.
Is ADD-Ins Capable of solving my problem.
|
|
|
|
|
Hello
Your question is not clear. What are you trying to do:
1- Make a program that makes C# projects at runtime?
2- Make a project from an existing one to inherit its references?
3- Choose between several projects and merge the chosen ones into one big project?
4- More than one of the above?
Please post more details.
Regards
|
|
|
|
|
yes 1 and 3 is the options that i want to perform. That is a program should be able to make new c# projects at the run time and also several small projects can be added into it at run time.
Sorry that my question was not clear and u were not able to recognize it.
Regard
|
|
|
|
|
Hello
Well, yes VS add-ins can do it. Here is an Article[^] about it.
Yet, first you should understand the structure of VS project files. If you do, you can write an odinary exe program to mix up or segregate different projects based on theri files.
Regards
|
|
|
|
|
Hi
I need to use MD5 technics for encripting & decripting the password.
So if any body knows about that, plz give me an idea to use the MD5 technics.
Just give me some example that to know the process.
Thanking u
Regards,
Naren.
please help me
|
|
|
|
|
MD5 in itself can't be 'decrypted'.
MD5 is a hash. It is commonly used to store passwords in the following manner:
Step 1) The user signs up and enters his/her password, where it is MD5ed and stored locally.
Step 2) The user logs on with a password, which is MD5ed and compared with the local hash.
I'm sure you can find an article on MD5 on google or here on codeproject.
|
|
|
|
|
MD5 hashing is one way, so you can't 'decrypt' it as such. You'd usually use it to store passwords in a file or database so they're not readable by anyone with access to the database. When someone comes to log-in, you hash the password again and compare the hashed passwords to see if they're entered the correct one.
.NET has a built in function for this:
string hashedPassword = FormsAuthentication.HashPasswordForStoringInConfigFile("Password to Hash", "MD5");
http://msdn2.microsoft.com/en-us/library/system.web.security.formsauthentication.hashpasswordforstoringinconfigfile.aspx[^]
Regards,
Rob Philpott.
|
|
|
|
|
My App keeps on throwing a System.OutOfMemoryException on the e.Graphics.DrawCurve(...) line. Any Ideas?
private void Charges_Paint(object sender, PaintEventArgs e)
{
if (activeParticles < 1)
return;
Pen myPen = new Pen(Color.FromArgb(128, 0, 0, 0), 2.0f);
for(int i = 0; i < activeParticles; i++)
{
if (myParticles[i].Charge)
myPen.Color = Color.FromArgb(128, 255, 0, 0);
else
myPen.Color = Color.FromArgb(128, 0, 0, 255);
e.Graphics.DrawCurve(myPen, myParticles[i].GetCurve());
}
}
|
|
|
|
|
Hello,
I think you have to dispose the pen. Otherwise the GC doesn't clean it.
mypen.Dispose();
Hope that helps,
All the best
Martin
|
|
|
|
|
Hey Martin,
Thanks for your input. I had indeed forgotten to Dispose of the pen, but there is still the same error on the same line.
private void Charges_Paint(object sender, PaintEventArgs e)
{
if (activeParticles < 1)
return;
Pen myPen = new Pen(Color.FromArgb(128, 0, 0, 0), 2.0f);
for(int i = 0; i < activeParticles; i++)
{
if (myParticles[i].Charge)
myPen.Color = Color.FromArgb(128, 255, 0, 0);
else
myPen.Color = Color.FromArgb(128, 0, 0, 255);
e.Graphics.DrawCurve(myPen, myParticles[i].GetCurve());
}
myPen.Dispose();
}
|
|
|
|
|
SharpenedC wrote: myParticles[i].GetCurve()
without knowing what that call does, its impossible to tell you why your app is running out of memory. Likely candidate is an infinate loop within that method call (have you incrememnted all loop control variables - thats a common cause). Of course the other possibility is that you have a huge number of elements in your myParticles array (activeParticles), and it is genuinely running out of available memory to draw all the curves.
|
|
|
|
|
Indeed. Although I might add, the exact error message is "An unhandled exception of type 'System.OutOfMemoryException' occurred in System.Drawing.dll"
public PointF[] GetCurve()
{
PointF[] myPoints = new PointF[4];
myPoints[0] = location.ToPoint();
for(int i = 1; i < 4; i++)
{
myPoints[i] = History[i - 1].ToPoint();
}
return myPoints;
}
EDIT: And the exception is thrown as soon as activeParticles exceeds 1.
|
|
|
|
|
SharpenedC wrote: An unhandled exception of type 'System.OutOfMemoryException' occurred in System.Drawing.dll
Yes, I assumed so, this message often is thrown when an infinite loop is entered into.
Have you tried stepping through the code to see what is happening?
|
|
|
|
|
Hello,
Maybe you have a recursive Call here.
Try to prefent it with a boolean flag:
private void Charges_Paint(.....)
{
if(allreadyinuse==false)
{
allreadyinuse= true;
//Start Youre code
//End Youre code
allreadyinuse= false;
}
}
All the best,
Martin
|
|
|
|
|
I implemented your idea, but now nothing happens :<
private void Charges_Paint(object sender, PaintEventArgs e)
{
if (!isPainting)
{
isPainting = true;
if (activeParticles < 1)
return;
Pen myPen = new Pen(Color.FromArgb(128, 0, 0, 0), 2.0f);
for (int i = 0; i < activeParticles; i++)
{
if (myParticles[i].Charge)
myPen.Color = Color.FromArgb(128, 255, 0, 0);
else
myPen.Color = Color.FromArgb(128, 0, 0, 255);
e.Graphics.DrawCurve(myPen, myParticles[i].GetCurve());
}
myPen.Dispose();
isPainting = false;
}
}
-- modified at 9:37 Thursday 31st August, 2006
|
|
|
|
|
Hello,
Sorry but I don't get your 'if' statement here.
if(!isPainting)
{
isPainting = true
//I think, here should be youre code
}
else
{
}
isPainting = false;
All the best,
MArtin
|
|
|
|
|
SharpenedC wrote: myParticles[i].GetCurve()
That is returning incorrect data. Check the values returned from that call when it crashes, you will likely spot a logic error
|
|
|
|
|
Hi. I am new to the programming bussiness. I have a urgent question.I am still working on .net 2003. When i am on a windows form, and run a select statement from sql to retrieve data, about 5000 records, the app is displaying in the task manager - "Not Responding" and it is opening a new instance of that. When it has retrieved the data, it is then running again and the other instance dissapears. Can smeone please help. This app must write about 50 000 records in to sql in one stage after it has checked in the db for duplications, and cannot display that it is not responding.
Thanks
|
|
|
|
|
Hi
Usually a program runs in a sequential manner (in a single thread) it means that each line of code should be executed and returns before the program flow can proceed.
Sometimes it takes some time for a command to be executed ( like you said,when a SQL statement is executing) and since your program is waiting (busy) during this operation if you want to ask its status using Task Manager,you will get "Not responding"
there are some ways that you can avoid this situation.
You can execute a command Asynchronously ( in another thread.)
This way your command will be executed in another thread (sequence of program flow) and you will be notified when the command execution is ended.
Regards
|
|
|
|
|
Hello,
i'm creating a custom control derived from the textbox class. The user must not be able to set focus on the textbox so i want to do it like this:
bool noFocus = true;<br />
<br />
protected override void OnEnter(EventArgs e)<br />
{<br />
if (noFocus == true)<br />
{<br />
}<br />
}
which code should I write after the comment tags?
Kind regards,
Frederik
|
|
|
|
|
hi
try to make the textbox disable.
Tamimi - Code
|
|
|
|
|
-> if the user cannot focus the textbox, why not set the ReadOnly textbox property to true?
-> you can also set the focus to another control you want in this code snippet, for instance.
good luck
|
|
|
|
|
Hi
As far as I know you can not force a custom control to lose focus but you can notify its container that it can gain the focus (by making it deisable or readonly ) or you can throw an exception when your text box is getting the focus.
for example:
<br />
protected override void OnEnter(EventArgs e)<br />
{<br />
if(noFocus)<br />
throw new MyTextBoxCantGetFocusException();<br />
}<br />
then you can manage the focus in your container
Regards
|
|
|
|
|
I Found the solution:
bool noFocus = true;<br />
<br />
protected override void OnEnter(EventArgs e)<br />
{<br />
if (noFocus == true)<br />
{<br />
int index = Parent.Controls.IndexOf(this);<br />
Parent.Controls[index - 1].Focus();<br />
}<br />
}
|
|
|
|