|
.ra is RealCrap...er, RealPlayer. Windows Media Player can't play RealAudio streams.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Heath Stewart wrote:
RealPlayer.
Does realplayer have has any activex or library?
Mazy
"A bank is a place that will lend you money if you can prove that you don't need it." - Bob Hope
|
|
|
|
|
Yes. It's often embedded into web pages just like Windows Media Player. You can use this in Windows Forms applications as well.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
RealAudio streams use a proprietary format and require that you have an ActiveX control to play them. RealPlayer has an ActiveX control that you typically find in web pages. If you right-click on the Toolbox in VS.NET and customize, you should see the RealPlayer ActiveX control (or something like that) if you have it installed. When you deploy your application, you must make sure that the clients have RealPlayer installed and that you also ship the interop assemblies that are created when you create the RCW (runtime callable wrapper) for RealPlayer.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
For my application i am generating reports in excel. I am writing the records to a text file and applying the formatting to that and then saving it has excel file. I want to create a new worksheet once the maximum no. of rows reached in an excel worksheet. How to go abt that? pls suggest me a way
|
|
|
|
|
Hi..
As of now most of the examples ,I have encountered on distributed apps,
The server side sends asyncronous notifications to all the clients that have hooked up to the server.
for example in a tyical publish-subscribe example ,say 5 clients
have registered thier callbacks with server and whenever the server gets a magzine detail ,it sends out the info and all the clients get it..That's perfect..
I wanted to build an application wherin the server sends asyncronous messages only to a specific client by identifying the client's credentials when it had first connected to the server .
is it possible...?[Like in a conventional chat application.]
God Is Great
|
|
|
|
|
For every connected client a new Socket object is created. You can store the Sockets in a Hashtable, with some client information as the key. Then you can pick specific Sockets from the Hashtable and send messages only to these clients.
I don't have an example in C#, but if you know Java, try this one (Version 3.1 or lower):
http://cocoswelt.online.de/beginners/english/JavaChat/indexChat.html[^]
|
|
|
|
|
Let me just remind everyone that this guy is a scumbag and his site links to others where people keep illegal copies of current books. Before you rush off to get some books for free, ask yourself if you think it's Ok to steal a car. Is it OK for someone to steal your computer ? What's the difference ?
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
anybody know how to do tic tac toe games using look ahead function?
|
|
|
|
|
To discuss the look-ahead functions in any game would require quite an indepth discussion on queue theory. This is the fundamental basis for all look-ahead processes since the management of queue depth (how far ahead I look), the evaluation of each queue value (how heavily weighted should a given queue be given to determine best move), and finally queue tie-breaker resolution (two best moves are equal).
I would begin by searching for articles and/or books on either queue theory or architectural implementations of chess. You are more likely to get queue theory searching for chess instead of tic-tac-toe --- but then apply that to your example.
Your approach, however, is a fine way to approach it. Start with something very simple that can do the basics listed above....then try to ramp it up to something far more complex.
BTW--I don't know how widely known this is...but the basics of queue theory that were deployed in BigBlue (the chess game) was the prototype research for improving queue process within MVS.
_____________________________________________
Of all the senses I could possibly lose, It is most often the one called 'common' that gets lost.
|
|
|
|
|
Hi, all!
I want to allow users to change current UI language dynamically (with no application restart). How can I do that when I have already creted MainForm in my C# application? Do I need to recreate it completely?
Thanks.
Regards,
alexx.
|
|
|
|
|
I think it does not matter. All applications use technic with restart after change UI language... So I'll do the same
|
|
|
|
|
Call InitializeComponent() again but it could be dirty way.
Mazy
"A bank is a place that will lend you money if you can prove that you don't need it." - Bob Hope
|
|
|
|
|
You have to change the current UI culture by assigning a new CultureInfo to Thread.CurrentUICulture and then re-initialize your controls. You should not, however, call InitializeComponents again because that instantiates and re-adds the controls (so you'll get duplicates) to your container. This means that you'll have to break the designer and move all the property assignments out of that method (or better yet, just pull that method apartment into separate calls to instantiate and add, and to assign properties). This is not very common in applications, however. Most applications - especially larger, more complex applications - require a restart.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
i just started learning c++ so it may just be a noob question but i am haveing a problem. I am trying to make a prog that writes names and number to notepad. When i run it it write the names and number but on top of it it has a set of numbers (1245068) and that will happen everytime.
Example:
1245068
John
Doe
5678906
Jaine
Doe
23456789
That is what is on notepad. My question is what i am doing wrong to get that set of number and how to just write the first name then last name then number. If anyone could help it would be appreciated. my code is bellow.
#include<stdlib.h>
#include<iostream.h>
#include<fstream.h>
int main(int argc, char* argv[])
{
int x=0, y=0;
string L_Name[100];
string F_Name[100];
int number[100];
char resp;
//Reads if there is already info in there and puts it into array
ifstream read("File.txt");
while(!read.eof())
{
read >>F_Name[x] >>L_Name[x] >>number[x];
x++;
}
read.close();
//Where the user can enter more name
do
{
cout <<"First Name: ";
cin >>F_Name[x];
cout <<"Last Name: ";
cin >>L_Name[x];
cout <<"Number: ";
cin >>number[x];
x++;
cout <<"Would you like to enter another name?(y/n)";
cin >>resp;
}
while((resp=='y')||(resp=='Y'));
y=x;
//writes the origianl names then the new name but here is where i get the
//set of numbers
ofstream write("File.txt");
for(x=0; x<y; x++)
{
write <<F_Name[x] <<endl;
write <<L_Name[x] <<endl;
write <<number[x] <<endl;
}
return 0;
}
|
|
|
|
|
|
Damn, C++ is ugly! All those >> and << make me woozy!
|
|
|
|
|
Anyone know of a reasonably fast grid control for .NET - e.g. something like Stingray for MFC. It just seems that the one thing .NET does badly is good performance on grid controls, or anything thats graphics intensive. Some of them look great, but put more than 50 rows and they crawl when you scroll.
Looking for something that is responsive enought to handle realtime data - not huge amounts of it but to be responsive when it does get it.
From what I can tell the double buffred drawing built into the Windows Forms Control is not as optimised as it could be.
"Je pense, donc je mange." - Rene Descartes 1689 - Just before his mother put his tea on the table.
Shameless Plug - Distributed Database Transactions in .NET using COM+
|
|
|
|
|
http://www.janusys.com/janus/library/
|
|
|
|
|
www.Infragistics.com[^] has an excellent deal.
John
"You said a whole sentence with no words in it, and I understood you!" -- my wife as she cries about slowly becoming a geek.
|
|
|
|
|
Developer Express[^] has a good one, too. I've used Infragistics and I can tell you from experience that it is good, but their painting mechanism (very extensible) can be very slow on older machines.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Syncfusion www.syncfusion.com[^] has a great grid called "Essential Grid". It is developed by Stefan Hoenig, the man who build before the Stingray grid. It offers a "virtual mode" that can handle millions of rows. I like it!
Regards,
Holger Persch
|
|
|
|
|
Hi,
I'm trying to create a C# web service that takes a string (a file path) and returns the xml document. I'm having some trouble with this task so any help would be much appreciated. If you know of any examples that do this, please share them. My web service function looks like this:
[WebMethod(Description = "Returns the xml file.")]
public XmlDocument GetXmlFile( string sXmlFilePath )
{
if( sXmlFilePath != "" || sXmlFilePath != null )
{
m_XmlDocument.Load( sXmlFilePath );
m_XmlDocument.Save( @"C:\Documents and Settings\dsterling\Desktop\Golfers311.xml" );
}
return m_XmlDocument;
}
m_XmlDocument is a global variable. Below is the code in my web service consumer app.
private void button1_Click(object sender, System.EventArgs e)
{
XmlNode xNode = TWS.GetXmlFile( @"C:\Documents and Settings\bob\Desktop\Golfers.xml" );
xDoc.Load( @"C:\Documents and Settings\bob\Desktop\Golfers.xml" );
xDoc.Save( @"C:\Documents and Settings\bob\Desktop\Doug.xml" );
System.Diagnostics.Process.Start( "notepad.exe", @"C:\Documents and Settings\bob\Desktop\Doug.xml" );
}
Thanks for your help!
|
|
|
|
|
What's the error? And why is your XmlDocument "global"? You realize that more than one person could call this method concurrently, don't you? Your current method will invariably break because someone may get someone else's data since the variable reference could change mid-execution (since a CPU slices time between threads and processes).
Besides, your web application can't access a file on the client machine like that! That just isn't possible. In order to do that, you would have to either specify a path on the server or upload the document to the web server first. This doesn't have to be persistent, however. You could pass a stream that the web service would save to a file. Actually, though, a web server is probably not a good solution for your problem if all you're trying to do is upload a file. Simple HTTP can handle this easier than SOAP. You'd simply make a new HttpWebRequest , get the request stream, and pass the file. The handler on the server would get this stream and save it to a directory, passing back an HttpWebResponse that tells if it was successful or not. Be careful with this kind of solution, however, since the user your web application runs as (by default, this is ASPNET for ASP.NET and IUSR_YOURCOMPUTERNAME for IIS itself) will need write permissions. This means anyone could upload anything and could potentially upload - say - a .aspx file that deletes most of your hard drive! This is where you should try impersonation (even with the web service, which gets a little harder but isn't too bad) using the HttpWebRequest.Credentials property (and disabling anonymous access on the web server with something else enabled like Windows Integrated Authentication), or the WebClientProtocol.Credentials property, which your web service consumer class inherits.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
I want to have a dynamic array that I can have as a lookup table so some elements will contain data and some will contain nothing.
Here's what I have now (This doesn't work yet)
<br />
ArrayList employeeLookup = new ArrayList();<br />
<br />
if (employeeLookup.Capacity < (employeeID + 1))<br />
{<br />
employeeLookup.Capacity = (employeeID + 1);<br />
}<br />
<br />
employeeLookup[employeeID] = i;<br />
This causes an index out of range error, because Capacity doesn't initialize anything. I can't just use the .Add method cause I need the data to be in a specific element of the array. Not to "troll" this message but is there a cleaner more C++ way of doing this? Hard to figure out without using pointers or allocating memory manually. Just looking for a clean way to accomplish this.
Thanks!
|
|
|
|