|
A comma usually denotes a thousands seperator, at least in English numbering. For example, one might write 1000 as
1,000
Is this what you're trying to parse? Or is a comma truely in place of a decimal point, for example, instead of 1.5 it's 1,5?
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Is Jesus the Jewish Messiah?
The apostle Paul, modernly speaking: Epistles of Paul
Judah Himango
|
|
|
|
|
That's exactly what's happening, but the coma are in the point place in one of my projects, not in others, I suspect is something related with my project language, any idea please?
|
|
|
|
|
Specify a fixed culture when converting the float to a string.
float x = (float) 0.6;
x.ToString(new CultureInfo("en-US")));
"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
|
|
|
|
|
Yes for sure, thats right, the point it's do that in a global level, (in my app domain) anyway was really helpfull you idea Troschutz, wolud you help on that too??? thnx & sorry for the inconvenience.
|
|
|
|
|
If no culture is specified, ToString and similar methods use the value of the CurrentCulture property of the current thread. So do:
Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
"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
|
|
|
|
|
Thnx, now I'm a mutch better Software engineer..
|
|
|
|
|
No, it gives "0?6" where "?" is replaced by whatever the user specified in regional settings for US English.
float x = (float) 0.6;<br />
x.ToString(new CultureInfo("en-US", false)));
gives "0.6" no matter what the regional settings are as you specifically istruct it to ignore any custimization made for the culture.
|
|
|
|
|
Hello Friends
I have a form with several controls on it,
Now I want to know on what control user clicks,
It means I want to show messagebox like this :
BRAVO! YOU CLICKED ON BUTTON1
I don't want to write a code in all cotrol's MouseDown event and i want to write it in form's mouse click event once.
Thank You
|
|
|
|
|
Won't work like you want because the Click event of the Form won't fire when a control on it is pressed. You could nevertheless write a recursive function to bind all events:
private void BindMouseDown(Control control) {
control.MouseDown += new MouseEventHandler(OnAnyControl_MouseDown);
foreach (Control subControl in controls.Controls)
BindMouseDown(subControl);
}
BindMouseDown(this);
The sender argument in your handler will then tell you which control was clicked.
|
|
|
|
|
Hello Dear Robert Rohde
Your code solved my problem and it was so cool.
Tank you very much
|
|
|
|
|
This is how we did it 20 years ago. Now, we use Windows messages. And, if you are doing it in C# (or VB.NET), it is even simpler: double-click the button1 control, and VS.NET generates an event handler for you, into which you put your code to display the message box.
--------
"I say no to drugs, but they don't listen."
- Marilyn Manson
|
|
|
|
|
hi all,
i have a simple form with a label and button on it.
i want to print the labeltext when i click the button. but i dont know how to do it ?
would you please help me do this using c# ?
thanks in advance,
bye.
-- modified at 11:04 Monday 8th May, 2006
|
|
|
|
|
|
Hello.
I'm looking for information on to add / change wireless settings like SSID, Passphrase, and decrypt keys through C# .NET... is this possible?
The reason i'm asking is because i'm developing an simple application which can change specific network parameters like IP, DNS, etc. and i need to be able to add / change wireless connections too.
|
|
|
|
|
Hi,
How do I include the '<' character in a c# XML comment (///)?
What is the escape character?
ie.
/// ie. List<string> ......
won't work because <string> is interpreted as a xml element. but I just want to use the '<' and '>' as a comment.
Any help greatly appreciated. Thanks in advance
Pakl
|
|
|
|
|
Did you try using & lt; and & gt; ?
Tarakeshwar
A conclusion is the place where you got tired of thinking.
-- modified at 10:46 Monday 8th May, 2006
|
|
|
|
|
Thats it! That easy
Thanks a lot!
|
|
|
|
|
Hi,
I am using a listview in view.list. I need to know how I could make the scrolling bar larger in order to have it really usefull on a PDA. Actually, I am trying to make a program that will avoid the use of the stylus. I therefore need to have a scrolling bar larger (my thick fingers cannot grab the scrollbar ).
Also, I am using the same listview over and over (always in view.list mode), clearing the text that it contains and putting new text. The only problem I am having with that is the size of the column that do not change automatically everytime I have new text.
i.e.: I put the text {a, ab, abc}. Then I clear the text. And finally I put {a, b, c}. The columns will still have the width of the first input.
Anybody have any idea how I could make the width dynamically resizing everytime I am clearing it and putting new items?
I know that I could use something like:
myListView.columns[0].width = -1; // -1 standing for the automatic resizing.
The problem with this is that I have no column in myListView.columns[] (looked through the debug mode, after having a null reference). It is because I am using myListView.view = view.list and not myListView.view = view.details or something else.
If anybody could help, I would really appreciate.
Thank you
===========
| Nicolas |
===========
|
|
|
|
|
Im getting "The Server is not operational" when authenticating user to active directory
Any help plzz...
Thanks in advance
Krishna
|
|
|
|
|
Hi folks,
I have a webbrowser control on my form which I use to display some images in a file. The default view seems to be the filmstrip view, is there any way to switch it to thumbnail view? If not, is there another (easy) way to display the images like that with another control?
Thanks, Ben.
|
|
|
|
|
Hi folks,
I have a label on my status bar which should change according to whats going on, see this code...
label3.Text = "Opening Log File...";<br />
File_Log = openFileDialog1.FileName;<br />
parse_log(File_Log);<br />
label3.Text = "Ready";
Now for some reason, it will only change the text at the end of parsing the log, so in essence it actually works like this...
File_Log = openFileDialog1.FileName;<br />
parse_log(File_Log);<br />
label3.Text = "Opening Log File...";<br />
label3.Text = "Ready";
Is there any way to ensure that certain actions are done before others so that the label text is chnaged before the rest executes?
|
|
|
|
|
The problem is that the GUI won't Refresh until the operation has completed.
You can force repainting with either label3.Refresh() or Application.DoEvents() . The first one will only repaint the label. The second one will also repaint the rest of the GUI if needed. Have in mind that calling these 'too often' will decrease performance.
A clean solution would be to do the parsing in a separate thread and using Invoke on the label to update the GUI.
|
|
|
|
|
Thanks, the refresh solution is perfect as its only called every now and then
Many thanks!
|
|
|
|
|
HI,
How should i handle max(particular column) of a table in SQL server.
SqldataReader.executeReader() not handles it i suppose.
can any one help
|
|
|
|
|
If it is only one value you are fetching than you can use ExecuteScalar on the SqlCommand object. But I think ExecuteReader should also work.
|
|
|
|