|
The SoundPlayer.Play method should do it.
Kristian Sixhoej
|
|
|
|
|
sorry ,
but it makes the second sound only play
|
|
|
|
|
It seems like SoundPlayer can't do this.
DirectX should be able to do the job, but I'm not sure, and I don't know anything about using DirectX and C# together.
Kristian Sixhoej
|
|
|
|
|
There are articles, here at CP about managed DirectX [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
basically, what I'm trying to do is just acquire a piece of data from the last line in a text file.
Not sure if it's enough but, this is the code I'm using as a base to build from.
public double LastATMBalance()
{
double lastatmbal;
foreach (DailyBalance dailybal in dailybalance)
{
lastatmbal = Convert.ToDouble(dailybal.ToString());
}
return lastatmbal;
}
and this is the format of the text file i'm using.
3/27/2000,4800
3/29/2000,7750
3/30/2000,6990
3/31/2000,5000
4/6/2000,5000
11/12/2004,5000
6/9/2004,9990
2/20/2006,5000
4/1/2006,5000
4/9/2006,5000
not sure anymore info is needed.
Thanks for any assistance provided.
|
|
|
|
|
Hi,
I don't see a question, so what is your problem?
remarks:
1. your code won't compile since lastatmbal is not guaranteed to get a value.
2. why convert all the DailyBalance objects when the only one of interest is the last one?
|
|
|
|
|
what is dailybalance ? Is it a generic list? An array?
If it's a generic list, you could use dailybalance.Last() .
If it's an Array , you could use dailybalance[dailybalance.Length - 1]
"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." - Jason Jystad, 10/26/2001
|
|
|
|
|
Hi,
i have a senario, 3 buttons and 2 gridviews.The buttons(three buttons) related to the information in first Gridview is clicked, it populates the second gridview with the corresponding table in database. Now my_method needs to know which button is clicked, so that it uses stored procedure to do some database operations on that particular table.
Is there any way to get the value from button_clicked() to my_method, without calling my_method. The value will be used only when my_method() is called by some other operation.
Thanks
|
|
|
|
|
You could store the information in a field on the class in which the method resides.
|
|
|
|
|
Hi,
class
{
protected void Button1_Click(object sender, EventArgs e)
{
resbutton = "abcMenu";
.....
}
protected void Button2_Click(object sender, EventArgs e)
{
resbutton = "defMenu";
.....
}
protected void Button3_Click(object sender, EventArgs e)
{
resbutton = "jklMenu";
.....
}
protected void Button4_Click(object sender, EventArgs e)
{
resbutton; // here i need the value of resbutton for different above button_click events
.....
}
}
fields are not working properly. can u provide me some related code.
Thanks
|
|
|
|
|
suni_dotnet wrote: fields are not working properly.
I don't see any evidence from this code that you have a field at all.
Here is your code re-written:
class MyForm
{
private string resbutton;
protected void Button1_Click(object sender, EventArgs e)
{
resbutton = "abcMenu";
}
protected void Button2_Click(object sender, EventArgs e)
{
resbutton = "defMenu";
}
protected void Button3_Click(object sender, EventArgs e)
{
resbutton = "jklMenu";
}
protected void Button4_Click(object sender, EventArgs e)
{
switch(resbutton)
{
case "abcMenu":
break;
case "defMenu":
break;
case "jklMenu":
break;
default:
break;
}
}
}
Of course there may be better ways of doing this, but since we don't know what your actual overall goal is we can't say. Christian's suggestion of using delegates has merit also.
I'd also suggest using something other than a string for the field. Creating a specific enum that enumerates each type of button would be good.
|
|
|
|
|
sounds like you want to use a delegate.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
You're starting to sound like "Clippy".
"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." - Jason Jystad, 10/26/2001
|
|
|
|
|
i want to implement samll system that can retrieve information from some file, but i really don`t know how to do it? how to calculate Term frequency? how to indexing? i want to do it in C#.NET
|
|
|
|
|
Sounds like you need to hire someone, talk to your teacher, or tell your client they hired the wrong person,depending on your reason for wanting to do this.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Generally, the marker size of the legend should be changed automatically with changing the marker size of the corresponding series.
but I found that when the marker size of the series is increased to larger than some value, the maker in the legend does not change at all!
(it is changed only when the marker size is increased from very small value to some value, then it is not changed anymore!)
is this the bug of Chart Control? I found the maximum marker size in the legend is too small for me, I try to make it bigger, but I can not.
anyone can help me to clarify it?
|
|
|
|
|
I compare the speed of plotting between Zedgraph and MS chart control,
I found MS chart control is much slower than Zedgraph. Anyone knows the reason? Or just because MS chart control
contains more functions which may need more time for initialization or because MS chart use differet implementation technique from the one Zedgraph?
|
|
|
|
|
How can we possibly answer your question unless we know how you came to this conclusion?
"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." - Jason Jystad, 10/26/2001
|
|
|
|
|
thanks for your reply.
I just plot the same line chart with Zedgraph and MS chart control (i.e., the same x and y list values), then the time taken by MS chart control is much longer than Zedgrah.
|
|
|
|
|
Are we talking minutes, seconds, days? You gotta provide more info.
"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." - Jason Jystad, 10/26/2001
|
|
|
|
|
Well, two things
1 - are you sure it's faster for ALL graphs, or just the type you're testing
2 - why do you care ? Just use the control that works best for you.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Your testing, or results, is very incomplete.
Besides, the MSChart control is older than dirt itself, wasn't designed with the .NET Framework in mind (interop overhead, and pre-dates even the idea of the .NET Framework). Then there's ZedGraph, which was designed entirely under .NET. Is it really such a surprise??
|
|
|
|
|
Hi
i want share my exe app in network and users can run it via network, but i need grant full trust permisson to my assemblies, but i don't know how to do that.
Note 1 : i don't want to do this by caspol.exe, i want to do this by code or setting properties(within my app).
Note 2 : i found this url[^] for grant permisson to assemblies (Using the Trust Assemblies Location Property), but it is for VSTO and i want to do this for Visual Studio 2005.
can anybody help me ?
Thanks
|
|
|
|
|
I'm not sure a) you can do that programatically, or that b) it's a good idea. Security is put into place for a reason, and any application that attempts to circumvent it should be untrusted.
"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." - Jason Jystad, 10/26/2001
modified on Saturday, January 3, 2009 5:58 AM
|
|
|
|
|
Hi John
if you follow that link, it's possible to do that programatically.
|
|
|
|