|
I found it just before I saw your answer It seems there are two solutions: ReaderWriterLock and ReaderWriterLockSlim.
It seems to exactly what I need!
Thanks for your help!
|
|
|
|
|
Iam Using 2 Threads in My Application. 2 Threads has to Update the single Progress Bar, so that user will come to know when the Process is completed. iam very nave to C# can some body help me out regarding this Please.... Thanks in Advacne.....
Or else Please suggest some Sample....
|
|
|
|
|
|
I am writing a reminder software and now i want to play mp3 file when alerting the reminder to the user !
I have done something for wav file to play in background without opening an software.
Now my Question is that how to play Mp3 file form Alert without opening any software like windows Media Player!
|
|
|
|
|
you can convert your wav file into executable. some free software available on net
http://www.f2ko.de/English/a2e/download.php[^]
thank you
Life's Like a mirror. Smile at it & it smiles back at you.- P Pilgrim
So Smile Please
|
|
|
|
|
your solution is diffrent from my Question!
modified on Wednesday, March 31, 2010 3:45 AM
|
|
|
|
|
How big/long is the mp3 file?
If it isn't too big, I'd suggest converting it to a wave file, then using the SoundPlayer class[^] to play it.
Note that the filesize will increase when converting from mp3 to wav.
If you insist on keeping the file as an mp3, have a look at this article:
MP3 Player for Windows 7[^]
Kristian Sixhoej
"Invisible women out to kill ya - Oh, great!"
|
|
|
|
|
hi friends,
i am using xmlclass serailization to read the Xml File
///<Order xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" orderId="1" version="3.1.0" xmlns="http://www.abc.com/schemas/imaging/rps/order/2007/01/" ///>
</order>
XmlTextReader reader = new XmlTextReader(filename);
try
{
XmlSerializer serializer = new XmlSerializer(typeof(Class_name));
Class_object = (Class_name)serializer.Deserialize(reader);
reader.Close();
}
catch (Exception e)
{
reader.Close();
return;
}
it says that "{<Order xmlns='http://www.abc.com/schemas/imaging/rps/order/2007/01/>' was not expected."}"
my class defination is as follows
[XmlRoot("Order")]
public class Class_name
{
[XmlAttribute]
public string orderId;
[XmlAttribute]
public string version;
//default constructor
}
}
Can Anyone help me to resolve this!!
|
|
|
|
|
VCsamir wrote: Order
VCsamir wrote: order
Opening and closing tags are not matching. XML tags are case sensitive.
|
|
|
|
|
hi ,
Opps sorry friends..
The opening and closing tags are matching i have put "//" only because to show the example..(when i was posting the same code the <> tags were getting invisible )i have tried opening the xml in iexplorer it opens fine..
Thanks ..
Regards
Samir
|
|
|
|
|
You are not specifying the namespace in the XmlRoot attribute
|
|
|
|
|
Thanks Sir !!
I problem is solved.. i set the the namespace atrribute in the root!! thanks once again for being so kind..
Regrds
Samir
|
|
|
|
|
Hi,
I am trying to pass value from one windows form to another in desktop application using C#.
I have created two text boxes on Form1 and a button, on button click I am creating Form2 and From2 contains one button, on this button click I have to pass value from Form2 to Form1 textboxes.
I have created Properties in Form1.
public string Emp
{
get
{
return strEmp;
}
set
{
strEmp = value;
}
}
public string EmpID
{
get
{
return strEmpID;
}
set
{
strEmpID = value;
}
}
And on Form1 button click:
private void button1_Click(object sender, EventArgs e)
{
Form2 fr = new Form2();
this.textBox1.Text = strEmp ;
this.textBox2.Text = strEmpID ;
fr.ShowDialog();
}
On Form2:
private void button1_Click(object sender, EventArgs e)
{
Form1 fr = new Form1();
fr. Emp = "Alex";
fr. EmpID = "1121";
this.Close();
}
This code is not working, Please let me know where I am wrong.
Thanks,
modified on Wednesday, March 31, 2010 12:54 AM
|
|
|
|
|
|
First there is a compilation error at the 2 statements in which you are assigning variables to the textbox as name of the variables differ.
Second, you are setting the values in the text box of first form after calling the showdialog. So, the values can e displayed only after you close the dialog box.
Third, You are creating a new instance of form1 on the click of button on form2. It won't set the values on the initial form.
Praveen Raghuvanshi
Software Engineer,
India.
|
|
|
|
|
Thanks for your time but please let me know the right solution.
|
|
|
|
|
The link provided by 'eg_Anubhava' explains the communication in a clear way.
Praveen Raghuvanshi
Software Engineer,
India.
|
|
|
|
|
In addition to the article already linked - here's[^] a quick Tip that shows how to do it concisely
DaveIf this helped, please vote & accept answer!
Binging is like googling, it just feels dirtier. (Pete O'Hanlon)
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
|
|
|
|
|
Hello,
I am looking for ways to reposition the cursor when I am clicked on the first menu item from a form menu. It should create a jumping effect so the user doesn't have to scroll through the other menus which don't have a child menu.
for example.... one file menu has 4 items. Namely 1, 2, 3, 4 now only item 2 has child menu items. namely 2.1, 2.2, 2.3. I want the cursor to be on 2.1 when the user brings the mouse on 2.
Please let me know how to do that. I am trying the following:
private void toolStripMenuItem2_MouseHover(object sender, EventArgs e)
{
toolStripMenuItem2.ShowDropDown();
Point LocalMousePosition_1 = this.PointToClient(Cursor.Position);
System.Windows.Forms.Cursor.Position = new Point(500, 500);
MessageBox.Show(LocalMousePosition_1+"Happy New Year to DOTNETSPIDER.COM guys");
}
|
|
|
|
|
That sounds user-hostile -- I wouldn't use your application if it did that.
|
|
|
|
|
It doesn't matter if it's hostile or not, I need it now for some reason... let's just say all the supervisors in the MSc. program are crazy...... if you know a solution please help me ...otherwise please mind your own business....
|
|
|
|
|
|
well it doesn't let me add that... i have tried that... it says :
Error 1 'System.Windows.Forms.ToolStripMenuItem' does not contain a definition for 'PointToClient' and no extension method 'PointToClient' accepting a first argument of type 'System.Windows.Forms.ToolStripMenuItem' could be found (are you missing a using directive or an assembly reference?)
I am sure that the child menu item has been shown before that.... please help....
Thanks for replying......
|
|
|
|
|
Ohhh my god, what was i thinking, ofcause you cannot do that... sorry m8. Let me get back to you in a moment...
With great code, comes great complexity, so keep it simple stupid...
|
|
|
|
|