|
i meant to say i have created the namespace.
and put summary tags to it also..still its showing errors
alok2171
|
|
|
|
|
i meant to say i have created the namespace.
and put summary tags to it also..still its howing errors
alok2171
|
|
|
|
|
Hello,
what is the best way on how to write a single purpose app with no processing output in C#?
For the sake of an example, let's say that your app's only task is to rename a file (given as the parameter) to "foo" and then exit.
If I code this as a console app, I'll get a console window that opens during the (however short) execution.
I can also code this as a windows app, but then I'd have to set the main form's .Visible property to false upon start. That doesn't look like the most professional way on how to accomplish this task, apart from the fact that referencing and loading System.Windows.Forms etc is very inefficient if I'm not going to use these libraries anyway.
Then again, if I code this as a windows service, this app can't be started from the command line.
Anyone have any thoughts?
Thanks,
Michal
|
|
|
|
|
michal.kreslik wrote: I can also code this as a windows app, but then I'd have to set the main form's .Visible property to false upon start.
Why would you create the form in the first place? All you need to do is rewrite the Program.Main method (in Program.cs) to not create or open the form.
|
|
|
|
|
Thanks, cool.
I removed the Form and all extra references from the project.
Then I'm wondering - what is causing the console app project to open a console window then?
Thanks,
Michal
|
|
|
|
|
Ok, I can see it now:
console app's output type in the .csproj file is:
<OutputType>Exe</OutputType>
while the windows app's output type is:
<OutputType>WinExe</OutputType>
The "Exe" output type forces the application to open a new console window, while the "WinExe" doesn't open any console window.
Thus, the best way on how to accomplish the above task is to create a console application and switch the output type to "Windows Application" in the project Properties > Application.
Thanks,
Michal
|
|
|
|
|
I did this more than once with Windows applications.
I wrote the useful code in the constructor of the form, but didn't show the form.
In Program.cs , instead of
Form.Show(new ManiForm());
I just wrote
new MainForm();
|
|
|
|
|
Hi,
I am using this code to change the colour of a cell in the gridview.
Now I would like to know how to change the colour of another cell in another column in the same row.
private void dgvSecurityPricing_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
{
if (dgvSecurityPricing.Columns[e.ColumnIndex].Name == "Bid_Source")
{
if (e.Value.ToString().Length > 0)
{
if (e.Value.ToString().IndexOf("-") > 0) //Price retrieved from History...
{
e.CellStyle.ForeColor = Color.LightGray;
e.CellStyle.Font = new Font(dgvSecurityPricing.DefaultCellStyle.Font, FontStyle.Bold);
//here, I would like to do the same colour alteration as above but for another cell in the same row in a different column.
}
}
}
}
Thanks
|
|
|
|
|
I have use the Master Page. It worked well; but past 2 days i found error on this page. I couldn't find what is the error in that page.
Error Message that i got
Make sure that the class defined in this code file matches the 'inherits' attribute, and that it extends the correct base class (e.g. Page or UserControl).
Can any one give me solution for this
Regards,
LEE
|
|
|
|
|
John.L.Ponratnam wrote: Error Message that i got
Make sure that the class defined in this code file matches the 'inherits' attribute, and that it extends the correct base class (e.g. Page or UserControl).
The error message tells you what the problem is. The class in your code-behind file should inherit from System.Web.UI.MasterPage .
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Hello!
I'm working on an project and want to use MD5 algorithm but I was trying to write my own algorithm witch will works as the same as MD5.
At first I was writing in MS Visual Studio using a System.Security.Cryptography libryry:
using System.Security.Cryptography;
public string encoding(string testText)
{
//Declarations
Byte[] originalBytes;
Byte[] encodedBytes;
MD5 md5 = new MD5CryptoServiceProvider();
originalBytes = ASCIIEncoding.Default.GetBytes(testText);
encodedBytes = md5.ComputeHash(originalBytes);
return BitConverter.ToString(encodedBytes);
}
Now I want to implement the same algorithm, self-writed but without included librarys witch must return the same value. I have to write an code witch assign a hash code to some input string (like testText in function).
Have anyone some idea?
Thanks a lot!
Benny
|
|
|
|
|
cman80 wrote: Now I want to implement the same algorithm, self-writed but without included librarys witch must return the same value. I have to write an code witch assign a hash code to some input string (like testText in function).
Have anyone some idea?
Why do you want to reinvent the wheel? Why not use the code that is already built in to the .NET Framework?
|
|
|
|
|
http://en.wikipedia.org/wiki/MD5[^]
The internet is a powerfull thing.
But really, it won't be your own MD5 algorithm, it will be the md5 algorithm.
-- modified at 6:18 Tuesday 27th November, 2007
Incase you can't read, follow links, simply don't notice it. Full C code for the MD5 algorithm is supplied with rfc 1321
http://www.faqs.org/rfcs/rfc1321.html[^]
My current favourite word is: PIE!
I have changed my name to my regular internet alias. But don't let the 'Genius' part fool you, you don't know what 'SK' stands for.
-The Undefeated
|
|
|
|
|
Why would you want to replicate the code for an algorithm known to be weak anyway??
|
|
|
|
|
i used sandcaslte helpfilebuilder to create a help file.
its getting created but showin an error message :
[Missing namespace summary documentation for N:example2]
alok2171
|
|
|
|
|
Have you considered creating the summary documentation for the namespace example2?
|
|
|
|
|
Anybody knows the best hide/change my IP address software?
|
|
|
|
|
sivaramireddy p wrote: Anybody knows the best hide/change my IP address software?
Are you still going on about this? If you need to hide your IP address then use an anonymous proxy. Or something like Tor (as was previously recommended to you)
|
|
|
|
|
You've been watching too many movies. It's not possible to hide your IP address.
By the way, we're sick of repeating ourselves. Stop asking this question. It simply cannot be done. If you change you spoof your machines IP address, you won't get a response back from the server you're sending your request to. It'll go to wherever the IP address REALLY is.
|
|
|
|
|
hi
I will cheange background image of form with project setting
plz help me
regard
|
|
|
|
|
Which background image? The desktop or your form?
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook
"There is no wealth like knowledge, no poverty like ignorance." Ali ibn Abi Talib
"Animadvertistine, ubicumque stes, fumum recta in faciem ferri?"
|
|
|
|
|
I'm disappointed in you Mustafa. You had the perfect opportunity to crush this fool. Crush him like a bug.
|
|
|
|
|
Pete O`Hanlon wrote: I'm disappointed in you Mustafa.
Forgiveness master, your padawan has failed you
It slipped through the training, tao and kata that you have taught me. I shall try harder in the future.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook
"There is no wealth like knowledge, no poverty like ignorance." Ali ibn Abi Talib
"Animadvertistine, ubicumque stes, fumum recta in faciem ferri?"
|
|
|
|
|
I forgive you - after all, I have been known to answer a question or two myself in the past. It keeps them off balance. Is he going to crush me, impart useful information or impart useful information AND crush me?;)
|
|
|
|
|
How to provide secuity for webservices using c# ?
what are the ways to provide security for webservices? How can we implement this?
any one have idea regarding this, please help me?
G. Satish
|
|
|
|