|
First question is why would you need two sound cards? I don't think it will work. I have a system with a built in sound card but when I plugged in a PCI card it disabled the onboard.
only two letters away from being an asset
|
|
|
|
|
Thank you for reply.
I clear my intention.
What is the thing i have made an application which uses
an external sound card i.e. usb sound card.
currently i am using playsound function to play ding of system
But it uses default sound devices i.e. onboard sound card and not
my externally attached one. So i want any other function in which
we can specify sound card to be used to function to select default sound card.
Thanks in advance.
Rahul Kulkarni
|
|
|
|
|
Hi all
Firstly, I'm sorry if this is a stupid question, but I'm new at all thia programming malarkey.
I'm attempting to write an app using C# and at the moment I need a graph display that has several specific functions. Mainly, I wish it to be very interactive, with realtime panning and zooming of the displayed waveform.
I have completed this using GDI+, but it does not seem fast enough. When I pan or zoom the graphical display there is much flickering. Double buffering didn't help.
I've been searching the web for a good few hours now and come up with nothing.
Hence I though opengl was the solution, but I'm having trouble finding a tutorial or information about how to create standard windows form application with buttons and the usual controls and have an opengl view in it. (to clarify, its the opengl window on the form bit I cant find, *not* the windows form standard controls)
So, two questions really:
1. Will using opengl (CsGL, Tao, whatever) actually help? I as assuming it outperforms GDI+, is this assumption correct?
2. Are there any tutorials on how to plonk an opengl window onto a windows form?
Thanks in advance.
|
|
|
|
|
Yes, it will outperform GDI+. DirectX is another posibility, it has managed wrappers supported by Microsoft.
Programming DirectX is not trivial (I have no idea how it is with OpenGL) as you have to deal with stupid things like lost devices etc.
If possible timewise (and given the system requirements you can enforce before running your app) consider simply waiting for Windows Presentation Foundation which is in release candidate now.
|
|
|
|
|
I've not heard of Windows Presentation Foundation, I'll look that up. I'll also see if there are any tutorials for DirectX.
I think that opengl isn't all that hard. At least not for the relatively simple things that I'm attempting to do (a graph is just a bunch of lines after all)
I did find some tutorial about setting up an opengl window on a form, but I've yet to try and implement it. It also used CsGL as opposed to Tao, which I thought replaced CsGL.
Thanks for your reply and I'll keep plugging away.
Any other tutorials or information people could point me in the direction of would be very helpful.
Programming is hard
|
|
|
|
|
This is the code i'm using....
public void Sender(string BoodSkap, string No)
{
Salon.Library.SystemDefault sysdef = new SystemDefault();
sysdef.LoadData();
string Argu = "http://sms.co.za:5567/submission/send_sms/2/2.0?username=Example&password=Example123+"&message=" + Convert.ToString(BoodSkap) + "&msisdn=" + Convert.ToString(No);
HttpWebRequest Request;
StreamReader ResponseReader;
Request = ((HttpWebRequest)(WebRequest.Create(Argu)));
ResponseReader = new StreamReader(Request.GetResponse().GetResponseStream());
}
I got an error last night that said URL too long could not resolve.
What is the maximum length of a URL?
Thank you in advance...
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
|
|
|
|
|
If the URL could not be resolved then the address you provided does not exist. It is nothing to do with the length of the Url.
As of how to accomplish that have you ever tried Google?
Failing that try .
|
|
|
|
|
Thank you, i'll look into that.
Enjoy your day...
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
|
|
|
|
|
hey all
i'm having trouble creating my own "messagebox" class
problem: i want to be able to display large quantities of text. messagebox.show will not do for this option because i want a scrollable textarea to be used.
what i found: all the methods to do this use a custom form that needs to be instanciated and then one can use the showdialog option. i'm not fond of this way of handling it. i'd rather use a call like
MyMessageBox.Show(title,theverylongtext);
where MyMessageBox is the name of the class of my custom messagbox and no instance of any class.
tnx in advance.
|
|
|
|
|
So write a static method called show, which creates an instance of your form, shoves in the text, and shows it.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
thanks. this is my code now:
private MessageDialog(string text)
{
this.textBox1.Text = text;
}
public static void Show(string text){
new MessageDialog(text).ShowDialog();
}
i guess i could've made my constructor public and done something like
new MessageDialog(text).ShowDialog() from my main application to call it, but i like it better this way
topic can be closed
|
|
|
|
|
Remember to call Close on the form once you're done with it (after calling ShowDialog), otherwise you'd be leaking resources.
|
|
|
|
|
this may be of intrest to you as well.
http://www.codeproject.com/cs/miscctrl/MessageBoxEx.asp?df=100&forumid=155440&noise=2&mpp=50&select=1661227&msg=1661227
|
|
|
|
|
|
Hi,
Im writing a few things to an xml file. But if i repeat this, it removes all previous data in my xml file with new ones.
How can i prevent this? I want the data being appended.
Thanks in advance!
|
|
|
|
|
Your question cannot be answered. Yuor code is overwriting the nodes, or you have some other problem with persistence. We'd have to see the code to know.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi,
This is my xml class code:
class XMLWriter
{
XmlWriterSettings settings = new XmlWriterSettings();
DateTime dateTimeNow = DateTime.Now;
XmlWriter writer = null;
public XMLWriter()
{
this.settings.Indent = true;
this.settings.IndentChars = "\t";
this.settings.OmitXmlDeclaration = true;
this.settings.NewLineOnAttributes = true;
this.settings.Encoding = Encoding.Default;
this.settings.ConformanceLevel = ConformanceLevel.Fragment;
}
public void WriteStartElement()
{
this.writer = XmlWriter.Create("Testing.xml", settings);
this.writer.WriteStartElement("Information");
this.writer.WriteElementString("DateOfBuilding", dateTimeNow.ToShortDateString());
this.writer.WriteElementString("TimeOfBuilding", dateTimeNow.ToLongTimeString());
}
public void WritingToXMLDoc(string elementString, string writeToXMLDoc)
{
this.writer.WriteElementString(elementString, writeToXMLDoc);
}
public void WriterEndelementString()
{
this.writer.WriteEndElement();
this.writer.Flush();
if (this.writer != null)
this.writer.Close();
}
}
|
|
|
|
|
You won't be able to persist old data in the file when using the XmlWriter . Use XmlDocument and associated classes to deal with this.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
OK, well, this code creates a new XML document every time. You need to abandon this approach and use XMLDocument to load your document if you want to insert nodes into an existing document.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi,
Thank you guys!
I'll try that!
|
|
|
|
|
Hi gurus,
As the subject says, I'd like to know how I can convert and manipulate 15bits encoded colors to 24bits encoded colors?
For example 0x7fff is white...
Can any one show me a piece of code please?
Best regards.
Fred.
There is no spoon.
|
|
|
|
|
Well, you really just want to shift each value by 9 bits, so 0x7FFF << 9 is going to be 0xFFF700, which is the best you can do.
I've never heard of 15 bit color ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
he probably means 16 bit... (I hope )
|
|
|
|
|
Is 0x7FFF 16 bit white ? I didn't think so.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
no, it isn't. but 0x7FFF is 16 bit no?
|
|
|
|