|
Thanks... I'll just have to skip that feature in my program then.
MajorPaul
|
|
|
|
|
Hi.
In C# (VS2003 and not VS2005) how can play sound?
I have a clock and it has alarm. I want to play a sound for alarm.
Best wishes
|
|
|
|
|
There are two third party component available for C#.you can use SAPI component .Search on sapi with C# and use it
|
|
|
|
|
hello my friend if you want to play sound when the alarm notifies you , you have first to create an event for your own second to interlop win32 function for playing sound files you can use that easily from directx but i will assume that you don't have directX namespaces so open your mind now and follow me in the code below
<br />
namespace yourprogram<br />
{<br />
..<br />
..<br />
..<br />
public void delegate mydelegate (object sender , EventArgs e);<br />
.<br />
.<br />
..<br />
public class yourprogram<br />
{<br />
private const int SND_filename = 0x00020000;<br />
private const int SND_Async = 0x0001;<br />
[DllImport("winmm.dll")]<br />
public static extern void PlaySound(string filename , int api_constant_1 , int Api_constant_2);<br />
....<br />
...<br />
..<br />
public event mydelegate myevent;<br />
<br />
myalarm.NotifyMe();<br />
myevent(this,new EventArgs());<br />
...<br />
...<br />
..<br />
Private void myeventmethod(object sender , EventArgs e)<br />
{<br />
PlaySound("your file path to .Wav File",0,D_filename | SND_Async);<br />
}<br />
myprogramclass.myevent += new myDelegate(myeventmethod);<br />
I hope this will do the work
Mess With The Best And Die Like The Rest
|
|
|
|
|
I implement my class like this
using System.Collections;<br />
using System.Collections.Generic;<br />
<br />
namespace TryCollection.PositionEngine<br />
{<br />
class Tag : IEnumerable<Point><br />
{<br />
<br />
#region Declare variables for internal use<br />
<br />
private List<Point> pointList = null;<br />
<br />
#endregion<br />
<br />
<br />
#region Declare variables for properties<br />
<br />
private string name;<br />
<br />
#endregion<br />
<br />
<br />
#region Constructors<br />
<br />
public Tag(string name)<br />
{<br />
this.name = name;<br />
<br />
pointList = new List<Point>();<br />
}<br />
<br />
#endregion<br />
<br />
<br />
#region Properties<br />
<br />
public string Name<br />
{<br />
get { return name; }<br />
}<br />
<br />
#endregion<br />
<br />
<br />
#region Methods<br />
<br />
public void Add(Point point)<br />
{<br />
pointList.Add(point);<br />
}<br />
<br />
<br />
public IEnumerator<Point> GetEnumerator()<br />
{<br />
return pointList.GetEnumerator();<br />
}<br />
<br />
#endregion<br />
<br />
}<br />
}
but when I compile it, it shows me an error that
'TryCollection.PositionEngine.Tag' does not implement interface member 'System.Collections.IEnumerable.GetEnumerator()'. 'TryCollection.PositionEngine.Tag.GetEnumerator()' is either static, not public, or has the wrong return type.
How can I implement System.Collections.IEnumerable.GetEnumerator() while I already have 'System.Collections.Generic.IEnumerable<trycollection.positionengine.point>.GetEnumerator()? Help me! Thanks!
I'm ...
a fan of Manchester United
a fan of Ozzy Osbourne
a King of Nothing
-- modified at 3:42 Thursday 26th January, 2006
|
|
|
|
|
Oop, I fixed it myself. Thanks anyway!
using System.Collections;<br />
using System.Collections.Generic;<br />
<br />
namespace TryCollection.PositionEngine<br />
{<br />
class Tag : IEnumerable<Point><br />
{<br />
<br />
#region Declare variables for internal use<br />
<br />
private List<Point> pointList = null;<br />
<br />
#endregion<br />
<br />
<br />
#region Declare variables for properties<br />
<br />
private string name;<br />
<br />
#endregion<br />
<br />
<br />
#region Constructors<br />
<br />
public Tag(string name)<br />
{<br />
this.name = name;<br />
<br />
pointList = new List<Point>();<br />
}<br />
<br />
#endregion<br />
<br />
<br />
#region Properties<br />
<br />
public string Name<br />
{<br />
get { return name; }<br />
}<br />
<br />
#endregion<br />
<br />
<br />
#region Methods<br />
<br />
public void Add(Point point)<br />
{<br />
pointList.Add(point);<br />
}<br />
<br />
<br />
public IEnumerator<Point> GetEnumerator()<br />
{<br />
return pointList.GetEnumerator();<br />
}<br />
<br />
IEnumerator IEnumerable.GetEnumerator()<br />
{<br />
return GetEnumerator();<br />
}<br />
<br />
#endregion<br />
<br />
}<br />
}<br />
I'm ...
a fan of Manchester United
a fan of Ozzy Osbourne
a King of Nothing
|
|
|
|
|
Hi
I am learning crystal reports. I am using VS 2003.
I have a question. Is there a way to use get the stored procedures when we connect to the databse. When i connect to the database, i can see all the tables and the views and not the stored procedures. When i am following the ADO.Net procedure by making the datasets, and when i am runnning the application, i am prompted for a login window for that stored procedure. Even if I give the right login and password, i am getting login failed and I get a blank report .
Did anybody come across such problem.
Can anybody help me with this issue.
Thanks a ton in advance
Shreya
|
|
|
|
|
|
Thanks a lot Muhamad.
I did exactly what you did. When I run the application, , when it is time to view the report, i am getting database login again, and when i enter the details, i am getting login failed , try again. I am not sure why i am getting it. i set the databaselogon details in the program.
Please let me know
Thanks Shreya
|
|
|
|
|
Sorry What exactly you want to know. May be I'm not getting you point. Can you explain in detail? As I think there may problem in you connection seting in Report or from SQL Side.
Let me also know.
Thanks and best regards,
Muhammad Waqas Butt
|Muhamad Waqas Butt|
waqasb4all@yahoo.com
www.sktech.freewebspace.com
|
|
|
|
|
Hey howzit,
I am new to .NET, was a VB6 user. In VB6 one clicks on a control and then if you go to the code window, you can see a list of possible events associated with that control that one can use.
e.g. paint, terminate etc etc
In C# you only see the ones you create yourself, how do I get the list of all possible events? Or Do I need to go to MSDN everytime.
|
|
|
|
|
When you click on a contro, you can go to the properties wizard and click the "Events" tab. This is denoted by a yellow lightening bolt. In there you will see a list of all the events for that control.
Hope that helps
James
|
|
|
|
|
Shot thanks James, thats exactly what I wanted!
|
|
|
|
|
Hey Howzit,
In VS 2003 I used to just right click on the + next to the method in the code editor and say Collapse all or Expand all, in VS 2005 you can't do that.
Does anyone know how to?
|
|
|
|
|
Right click anywhere in the editor, and select "Collapse to Definitions" from the Outline submenu to collapse all.
To expand all, select "Stop Outlining" from the same menu.
|
|
|
|
|
I want this feature in Richtextbox
|
|
|
|
|
Hello to All,
I have to take input from mic as a wav formate stream. How can i do this with C#. Can anybody know about this plz help me with example code if you have.
Divyang J Mithaiwala
|
|
|
|
|
|
Use the RichTextBox class.
<br />
RichTextBox r = new RichTextBox();<br />
r.LoadFile(@"C:\Document.rtf", RichTextBoxStreamType.RichText);<br />
r.SaveFile(@"C:\Document.txt", RichTextBoxStreamType.PlainText);<br />
r.Dispose();<br />
|
|
|
|
|
Hello,
When COM structures are imported into C# remoting server, is there a simple way to make structures serializable? The idea is to use same structures on native and managed components.
Thank you & Best Regards,
|
|
|
|
|
hey ....i wanna know something...first my project about face recognition system...so i used eigen face algorithm so i need to convert from matrix (100*150) to vector so i need to convert to vector ,how could i ???
thanks for efforts
|
|
|
|
|
|
Is your question about converting a matrix to a vecotr?
--------
"I say no to drugs, but they don't listen."
- Marilyn Manson
|
|
|
|
|
|
You have to be more precise, as I don't want to learn the EigenFace algorithm to help you.
Is your matrix a colletion of vectors? Do you want to convert to a normal?
--------
"I say no to drugs, but they don't listen."
- Marilyn Manson
|
|
|
|