|
Hi,
I have seen the nice feature of .NET 2.0 for sending email using SMTP, but i did not find any way to use SMTP with Authentication (user name, password). Can u please show me some way....
thanks
|
|
|
|
|
Hi guys.I want to create a function of form (a*x^+b*x+c/d*x^+k*x+m)in order so I can enter in two texboxes coefficients [a,b,c] and [d,k,m]and then use this function to plot a graph.But I dont know how to get values from the texboxes and use them? Anybody can show me any tutorial or link for similar problem?I would be very grateful.Best regards
|
|
|
|
|
double d = 0;
if (double.TryParse(textbox1.Text, d)
{
// d contains the double
}
else
{
// the text could not be converted to a double.
}
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I want to edit a cell. Currently I have a Edit button which makes 2 cell editable and then I update.
Is there a way I can double click on cell and make that cell editable and change the value.
rather theb Click on Edit then Update or Cancel.
Thanks
Thanks
|
|
|
|
|
Use DataGridView component (.NET 2.0)...
There is possible to attach event on a cell...
|
|
|
|
|
Hello,
Switching from version 1.1 to .NET 2.0 I have lost about 40% of speed of my calculations. To find out what is the reason I tried to change ArrayList to List<T>, foreach to for loop. It did not work in my case.
Refining my code I came to very simple example: for loop was under investigation.
a) Empty loop
M = 1000000000;
for (int i = 0; i < M; i++)
{
//do nothing
}
Running time in milliseconds: .NET 2.0 – 2921, .NET 1.1 – 718. .NET 1.1 is 4 times faster.
For loop contains two visible operations: increment i++ and comparison i < M.
b)To find out what is slowing the calculation I added increment inside the loop.
for (int i = 0; i < M; i++)
{
count++;
}
Running time in milliseconds: .NET 2.0 – 3484, .NET 1.1 – 1703.
Now the deference is not so huge.
c) Let us add comparison operation
for (int i = 0; i < M; i++)
{
if (count<M)
count++;
}
Running time in milliseconds: .NET 2.0 – 5828, .NET 1.1 – 2046.
The difference is increasing.
d) More comparison
for (int i = 0; i < M; i++)
{
if (i<M)
if (count<M)
count++;
}
Running time in milliseconds: .NET 2.0 – 7421, .NET 1.1 – 2721.
One can conclude that the slowing part is the primitive comparison operation.
Can somebody say what is going on?
Thanks,
Alex
|
|
|
|
|
hi friends
i am having a problem.I am not able to play wav/mp3 file in C#.
I downloaded an activeX component "RSP MP3 Player OCX 2.7.5" but it was in vb.I tried convert it into dll.but then also it had a problem. one of its method was
PlayFile(string path,ref bool wait).
Could anyone just tell me what is ref bool
or
from where i can get a wav file activeX control which can be used in C#.
please help me its really urgent.
thanx in advance.
nauty
|
|
|
|
|
nauty wrote: ref bool
is essentially a reference or pointer to a boolean data type.
nauty wrote: from where i can get a wav file activeX control which can be used in C#.
.NET 2.0 has one in the framework.
Ed
|
|
|
|
|
If you are .NET 2.0 System.Media.SoundPlayer is the class you need. It will only play wav files. It's very basic in functionality, but if you only need to play wav files, then it should do. E.g.
<br />
using System.Media;<br />
<br />
...<br />
<br />
SoundPlayer sound=new SoundPlayer(@"C:\Path To\WaveSound.wav");<br />
sound.Play();<br />
<br />
If you are creating lots of instances of SoundPlayer don't forget to call Dispose() or use "using"
Graham
-- modified at 16:51 Wednesday 5th April, 2006
|
|
|
|
|
I think you meant to reply to nauty not me
Ed
|
|
|
|
|
Hi ed and grahan
thanx for the help but i am using 1.1
and there is no such namespace.i used mci32.ocx in my project but it was also not playing the files.So if you people have some winamp plugin or some winamp ocx files then do tell me.
and also what value is to be passed in the "ref bool wait" variable.i am really confused.
its reaally urgent
nauty
|
|
|
|
|
I met the same problem and I wrote a sound lib myself in C++.
Form C++, you can easily access mixer funcs provided in winmm.lib.
Of causeif DirectX is a shortcut if it can be installed in you system.
|
|
|
|
|
ref bool is a reference to a boolean value (like a pointer in C), it is used if the function needs to change one of the calling parameters, like in C.
So just declare a boolean, e.g.:
bool myWait = false;
and then pass it as, e.g.:
library.function(parm1, parm2, ref myWait);
This allows library.function to change the value of your variable myWait .
Ed
|
|
|
|
|
Did you search here on CP? I found someting here lately.
Coulda, woulda, shoulda doesn't matter if you don't.
|
|
|
|
|
searching is a great skill i can see ;]...
http://www.codeproject.com/cs/media/tonysound.asp
|
|
|
|
|
Hi buddies
Thanx for your wonderfull support.without your help i could'nt have done that.
I used "RSP MP3Player OCX 2.7.5" . just using it, the task became a kids play.
if someone else need it can download it from net.
Simply add its components and use its method. its the most easiest of all.
Thanx to all ones again and especially to Ed.Poore.
bye
nauty
|
|
|
|
|
I am working on a Data Grid View control that stores values of a matrix. The values can only be integers or floating point values. I have two problems:
1. How can I retrieve values from the DataGridView Control and store it in a double 2D array. Please tell me the approperiate method.
2. Can I bind the DataGridView Control to a specific data type, e.g. double, so that automatic validation can be done on the values entered.
Thanks
Naveed
|
|
|
|
|
Hello,
I am trying to use our 3rd party fax software FaxPress. It requires this line of text to be called during a command line.
Our old VB 6 app is doing this but using a shell command. I was told this could be done using the Process class in C#.
Here is what I have:
<br />
private void GenerateFax(string output, string subject, string faxPress, string account, string files, string phone)<br />
{<br />
StringBuilder executeString = new StringBuilder();<br />
executeString.Append("SubmitFax /S " + faxPress);<br />
executeString.Append(" /U " + account);<br />
executeString.Append(" /R " + phone);<br />
executeString.Append(" /O " + output);<br />
executeString.Append(" /B " + subject + " ");<br />
executeString.Append(files);<br />
executeString.Append(" " + "/C NO COVER PAGE");<br />
<br />
Process process = new Process();<br />
process.StartInfo.Arguments = executeString.ToString();<br />
process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;<br />
process.Start();<br />
}<br />
Does this look right? Is process.StartInfo.Arguments the right property? There is no batch file or .exe to be called, just this string.
Thanks for any help!
Chris
-- modified at 15:23 Wednesday 5th April, 2006
|
|
|
|
|
I'm not sure, but you might have to set the targeted app to cmd.exe, or even run cmd.exe, and pass the comand line parameters through it's input stream.
|
|
|
|
|
Like so? :
private void GenerateFax(string output, string subject, string faxServer, string account, string files, string phone)
{
StringBuilder executeString = new StringBuilder();
executeString.Append("SubmitFax /S " + faxServer);
executeString.Append(" /U " + account);
executeString.Append(" /R " + phone);
executeString.Append(" /O " + output);
executeString.Append(" /B " + subject + " ");
executeString.Append(files);
executeString.Append(" " + "/C NO COVER PAGE");
Process process = new Process();
process.StartInfo.FileName = "cmd.exe";
process.StartInfo.Arguments = executeString.ToString();
process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
process.Start();
}
|
|
|
|
|
tryston02 wrote: Like so? :
Does it work?
|
|
|
|
|
Not sure yet. I have to get the new number for our fax machine. I'll let you know.
Thanks for the help!
|
|
|
|
|
|
Off the top of my head, this won't work. Firstly cmd won't return (i.e. close) and it won't execute SubmitFax as the /C argument of cmd is missing. Instead use SubmitFax for the FileName property:
private void GenerateFax(string output, string subject, string faxServer, string account, string files, string phone)<br />
{<br />
StringBuilder executeString = new StringBuilder();<br />
executeString.Append("/S " + faxServer);<br />
executeString.Append(" /U " + account);<br />
executeString.Append(" /R " + phone);<br />
executeString.Append(" /O " + output);<br />
executeString.Append(" /B " + subject + " ");<br />
executeString.Append(files);<br />
executeString.Append(" " + "/C NO COVER PAGE");<br />
<br />
Process process = new Process();<br />
process.StartInfo.FileName = "SubmitFax";<br />
process.StartInfo.Arguments = executeString.ToString();<br />
process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;<br />
process.Start();<br />
}<br />
Graham
|
|
|
|
|
Graham,
Thanks for the input, however when I try this I get the following error:
"The system cannot find the file specified"
|
|
|
|