|
Tauseef A wrote: what you mean ?
Look at the documentation for the DateTime class and also some of the extra information in the link provided by Luc Pattyn.
It's time for a new signature.
|
|
|
|
|
hi,
i have to get system language or code page in a string.like if it is set english(united states) it should return english in string.hw can i get that?
|
|
|
|
|
System.Threading.Thread.CurrentThread.CurrentCulture.DisplayName or similar.
|
|
|
|
|
try this one...
string strLangName;
strLangName = Thread.CurrentThread.CurrentCulture.Name;
|
|
|
|
|
i have changed language in control panel/regional and language/advanced to japanese but this is still returning me english.
|
|
|
|
|
That's correct, the setting doesn't translate the strings. Do you have a Japanese version of Windows?
What are you trying to achieve?
I are Troll
|
|
|
|
|
There is no 'real' system language anymore. Stuff like code pages is only used for applications which do not support UNICODE, and since windows is complete UNICODE, this means only legacy applications (and console applications).
the following table[^] summarizes the various options quite nicely, and tells you which API to use to get at them.
|
|
|
|
|
Hi all,
I have a form that when loaded begins to write to a serial port. On closing the form, the serial port is closed. When I click the "X" button to close the form, the form stays open, but the data from the serial port discontinues. However, to get the form to actually close, it will not do so until I right click the form's pane in the taskbar. Not sure why this would be happening....
private void frmMain_FormClosing(object sender, FormClosingEventArgs e)
{
if (_serialPort.IsOpen) _serialPort.Close();
}
|
|
|
|
|
Set a breakpoint on the if and debug.
|
|
|
|
|
Is your form modal? The x button behaviour may vary based on this. See here.
|
|
|
|
|
There are two buttons (Button1、Button2) and one TextBox in the winform,I have two questions as below:
1、I want to the execute the button1_Click event when clicking the button2_Click?
2、when the text of textbox1 is changed, then call the button1_Click event, how to write in the textBox1_TextChanged?
thanks in advance,pls give the codes in detail.
(Don't use this method: place all the codes of button1_Click in one method then use this method in button2_Click)
|
|
|
|
|
Hi,
I know of 3 solutions:
1. put the logic in a simple method which gets called by all interested handlers, so have button1_Click and textBox1_TextChanged call the simple method;
2. call button1_Click() with 2 dummy arguments; maybe null, null is sufficient; maybe this, new EventArgs() is needed. In both cases, they do not really carry much information.
3. some actions can easily be simulated, try button1.PerformClick()
Most of the time I prefer #1.
|
|
|
|
|
I often us the this.button_click(null, null). Commonly, these two parameters of the method of button_click are no use.
|
|
|
|
|
That's not the best method to do it. Luc's number 1 response is the best way to do it since the code you write in other places doesn't have to know that it's passing bogus parameters to a method that doesn't even require them.
|
|
|
|
|
im using c# in creating artificial intelligence for my thesis, but i dont know where to start creating artificial intelligence... it is possible that artificial intelligence can response on what user saying?... can you give me an idea on how to start it or any source code that can give me an idea... tnx those people who response....
|
|
|
|
|
There are some 50+ CodeProject articles about artificial intelligence. Did you read any of them?
|
|
|
|
|
You have to be smart enough to tell it how.
|
|
|
|
|
PIEBALDconsult wrote: You have to be smart enough to tell it how.
Or you could always pick up and read a book on artificial intelligence....
modified on Thursday, April 22, 2010 10:38 PM
|
|
|
|
|
|
Abhinav S wrote: pick up and read a book
Wash your mouth out with soap!
You should never use standby on an elephant. It always crashes when you lift the ears. - Mark Wallace
C/C++ (I dont see a huge difference between them, and the 'benefits' of C++ are questionable, who needs inheritance when you have copy and paste) - fat_boy
|
|
|
|
|
This thesis should make interesting reading.
Steve
|
|
|
|
|
nEar_mO wrote: can you give me an idea on how to start it
Well, I'd start off by sitting down and working out what my detailed requirements are; but I'm funny that way.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
that way?
|
|
|
|
|
nEar_mO wrote: where to start creating artificial intelligence.
Start with natural intelligence?
Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
The only valid measurement of code quality: WTFs/minute.
|
|
|
|
|
I have a question... is it possible to develop a flight inquiry application using C# only and web services maybe, or I should register to some service in order to connect and read the flight details?
|
|
|
|