|
At the top of this page there is a search box.
Enter "play midi", and you'll find a few articles about playing midi.
_________________________________
Please inform me about my English mistakes, I still try to learn your language!
|
|
|
|
|
You can also drop a windows media player control in your form. Ofcourse this will enable you to do much more than just play midi files.
Regards,
Polis
Can you practice what you teach?
|
|
|
|
|
I tried to use TcpClient to send xml file to server...
But somehow my data get mess up, why is this so?
The resulting data is not in the same format that the data is sent
<sending side="">
TextReader infoReader = new StreamReader("SystemInfo.xml");
string info = infoReader.ReadToEnd();
Byte[] data = System.Text.Encoding.ASCII.GetBytes(info);
ns.Write(data, 0, info.Length);
<receiving side="">
using (StreamWriter sw = File.AppendText("clientInf.xml"))
{
string str = "";
byte[ ] buffer = new byte[1024] ;
while(ns.DataAvailable)
{
ns.Read ( buffer, 0, buffer.Length ) ;
str += Encoding.ASCII.GetString ( buffer ) ;
}
sw.WriteLine(str);
sw.Close();
}
|
|
|
|
|
Is it necessary for you to decode and encode the string to a byte array and back? You can simply wrap ns in a StreamWriter and write the string itself. At the other end, you can wrap ns using a StreamReader and simply call ReadToEnd() . And don't forget to Flush the writer after you're done.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
I don't really get it, do you mind showing me how to do it in coding? Well I didn't think about encoding though, I just thought that when transfering through socket, infomation needed to be converted to byte form... isn't it so?
Thank you,
|
|
|
|
|
Something like this
TextReader infoReader = new StreamReader("SystemInfo.xml");
string info = infoReader.ReadToEnd();
StreamWriter writer = new StreamWriter(ns);
writer.Write(info);
writer.Flush();
using (StreamWriter sw = File.AppendText("clientInf.xml"))
{
StreamReader reader = new StreamReader(ns);
string str = reader.ReadToEnd();
sw.WriteLine(str);
sw.Close();
}
I guess the .NET functions use the default encoding scheme to send and receive data. What you might have missed is Flush .
What exactly are you receiving?
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Can this method handle multiple client?
I mean like if the client are sending at the same time.. will the data get mixed up ? Well, I am making a service to inpect client hardware specf and then display it back on the website. It is for my internship project though.
Thanks a lot, will try it out tomorrow ..
|
|
|
|
|
Well... after looking through the resulting xml file, I discovered that it didn't really get mess up but instead one of the line get copied twice and somehow the second copy appeared at the end of the file... the same thing happened to the code you given though
|
|
|
|
|
Hello.
Now, I develop tools using stdole.dll.
When VS.NET install, this install on PC. Only .NET install, not install it.
I'd like to it except for them installing.
When OS is Xp, already installed, but this case is windows 2000.
If you have some solutions, please tell me.
|
|
|
|
|
please tell me how to know how many resources in a namespace
|
|
|
|
|
|
Is there a quick and simple way to scroll to the bottom of a RichTextBox control? I haven't found too many resources dealing with scroll bars. Thanks.
|
|
|
|
|
Does this help ?
textBox.Select(textBox.Text.Length, 0);
textBox.ScrollToCaret();
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
On top of what Kumar said, ScrollToCaret() only works if the RichTextBox has the focus. You might want to insert a call to .Focus() before you call ScrollToCaret() .
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
I am trying to grab a video clip from a movie in C# using DirectShow. I am using DirectShowNet project which I got from codeproject.com.It is working well when i am using devices like web cam etc .
I am getting problem in playing a movie which is stored on hard disk and capturing video clip from it.
An Exception is raised when SetupGraph() function is invoked from
RenderStream() function "Invalid Parameter".
I had used FilterCategory.LegacyAmFilterCategory as first argument to
DsDev.GetDevicesOfCat() function.And from the list of devices displayed by DeviceSelector class I am selecting 'File Source(async)'
|
|
|
|
|
hi all,
I need to give user name and password to windows 2000 Professional Logon Dialog using C# Application..
after that I need to access the computer without giving user name and password..
How can I do that?
|
|
|
|
|
I believe there's a dll that controls that on W2000, which you can replace with your own. As far as doing it to ANY W2000 install, I don't see how you could, the system would not be very secure if it allowed you to run code on a machine that has not been logged into. You may even have trouble because you're looking at C#, and the .NET framework may have trouble starting before anyone is logged in.
How do you want to access this computer ? Control it ? I really think you're talking about a C++ program here. You'd just end up importing so much API stuff, you're better off starting there.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I am fit with C++..
Can u tell me how to do that using C++?
I want to send values to User name and Password in "Log on to Windows" Dialog using C# or C++.
I am doing this because I can avoid entering username, password again and again..Then I can log on to machine automatically
OR Is there a another way to fullfill this?(using Windows Properties)
However my computer in a Domain..NOT in a WorkGroup.
If I am in a WorkGroup,I can easily Disable Appearing "Log on Dialog Box".
|
|
|
|
|
Can't be done.
What you should be looking into is setting up Auto Logon. See here[^]. No code required...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi,
Thanks a lot..
It is working
|
|
|
|
|
I am using the following code to create a graphics object (image) which i then write text to and display on the screen. When I try to resize the object's width i get an error saying that it is read only? What does this mean and how can I resize it?
m_objDrawingSurface = new Bitmap(this.ClientRectangle.Width,
this.ClientRectangle.Height, System.Drawing.Imaging.PixelFormat.Format24bppRgb);
To resize it I am trying to use:
m_objDrawingSurface.Width = this.ClientRectangle.Width;
Im trying to resize the image to match the window size when it changes.
Could someone please help to correctly change the size??
|
|
|
|
|
The property is indeed read only - a Bitmap does not allow you to change that sort of thing. You need to create a new Bitmap, use Graphics.FromImage to get a graphics object, and then draw your bitmap into the graphics object at the dimensions you want to convert it to. Bitmap.Clone also has a method that takes a size, but the size needs to be smaller, and it makes a copy of part of the image, it does not resize.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hey,
I want to write a peice of code which can be useful to shut down my computer from C# programmer. I want to call executable responsible for shutting down computer is it possible?
|
|
|
|
|
There are API calls that do this, which you can import into C# and call. The .NET framework has nothing to do this for you. I googled for more info ( my code to do this is at home ), and this is the first link I found:
http://www.codeproject.com/csharp/timercomputershutdown.asp[^]
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
You can use the following which is actually a shell command:
System.Diagnostic.Process.Start("shutdown","/s")
For a different tactic, take a look here[^].
Regards,
Polis
Can you practice what you teach?
|
|
|
|