|
CultureInfo's properties are read-only once assigned to your app's thread. You'll need to create a new CultureInfo object with the settings you desire.
System.Globalization.CultureInfo info;<br />
info = System.Globalization.CultureInfo.CurrentCulture;<br />
info = new System.Globalization.CultureInfo(info.LCID, true);<br />
info.NumberFormat.NumberDecimalDigits = 6;<br />
System.Threading.Thread.CurrentThread.CurrentCulture = info;
Unfortunately, the Double.ToString() method (without arguments) ignores the NumberDecimalDigits property. You have to do a Double.ToString("N") for it to work, which is not what you want.
Unless of course there's a way to change the default format string for a double.
|
|
|
|
|
Is there a SQLDMO equivalent for Oracle? I am stuck in my project due to this. I have developed an application that uses SQLDMO that works great for SQL Server database. Now I need to extend that app to Oracle and am having a hard time finding a tool that does to Oracle what SQLDMO can do for SQL Server.
Thanks in advance.
|
|
|
|
|
I could be wrong but I don't think there is an exact equivalent of SQLDMO in Oracle. You should go to Oracle's developer's network and query their message boards or knowledge bases. Oracle does have some .NET tools such as ODP.NET.
|
|
|
|
|
Hi all,
I want to serialize Cursor object on server
and deserialize it on client.
I tried to implement it but i got
exception "Cursors can't be serialized"
Can anybody give me a code snippet that
shows how to do it?
thanx
"Imagination is much more important than implementation"
|
|
|
|
|
A mouse cursor? There's really nothing to serialize, except maybe which cursor is being used and it's position on the screen. What are you trying to do with this?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I want to inform client that which cursor is being used.
Can u give me idea how to do it.
Thanx.
"Imagination is much more important than implementation"
|
|
|
|
|
Why??? There's no reason for it! The cursor changes depending on what's going on in the current application, what window and what part of a window the cursor is over, ... I just don't see any useful information in it.
This is basic serialization to an XML file.
Dim serializer As New XmlSerializer(GetType(Cursor))
' You can use other stream types, but you never said what you're doing with this
' or how your passing this to any client...
Dim writer As New StreamWriter(filename)
serializer.Serialize(writer, Cursor.Current)
writer.Close()
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I have created 3D head and my appliction that I input text it will read . I want to programm lips movments accourding to out put soud. My text to speech application have programmed using C#. Help me !
Nothing's Forgotten, nothing's ever forgotten !
|
|
|
|
|
Of course, there's no way to do this using the .NET framework class library as it's just not a common programming operation. You're going to need some software that hooks up sounds with vertices on your 3d model; this is certainly something you don't want to be forced to program yourself (which would be an enormous undertaking, I would imagine).
Search the web for 3d lip syncing, you should get some hits. There is software out there built for doing this.
Now, if you don't need high-quality, full fidelity lip movements, you could just write some animation into your 3d model to move its mouth while the text is being read...
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Connor's Christmas Spectacular!
Judah Himango
|
|
|
|
|
Thank you very much for your comments.Anyway, can't I use MSAgent for that ? I mean is there any method join C# and 3D max or Poser.
Nothing's Forgotten, nothing's ever forgotten !
|
|
|
|
|
i need to send my query string value from my default.aspx?qs=123&qs2=456 to custom error page when there is error on page. on custom error i want to receive query string value from default.aspx and display error message depand on query string value.
appreciate your help
ap_sa
-- modified at 12:28 Monday 13th February, 2006
|
|
|
|
|
And the question is...?
---
b { font-weight: normal; }
|
|
|
|
|
I only started coding c# a week ago, and I’m a little stuck! I'm making an application where the user has 1 second to click the mouse button once they see movement on the screen.
My problem is: what is the best way of waiting until the mouse button has been pressed without hogging the system resources? If I use a sleep then the onclick method for the mouse click won’t be called until the sleep has finished I assume?
I need the time at which the mouse button was pressed, therefore sleeping for 1 second and then seeing if the mouse was pressed isn't good enough. Currently the application was coded by someone else, and it uses a while loop until the time equals 1 second later. Obviously this allows the application to receive messages and make the onclick method call occur but it also uses all the processing resources.
Further to this, is there a way of getting a time stamp of when a message occurred? This would be more accurate than getting the time once the on click method has been called.
Any help with this would be greatly appreciated!
Nick
|
|
|
|
|
If I've understood you correctly, then I suggest you something like this:
remember when timer was started in absolute values.
use another thread loop with Join(interval) method, where interval = precision of time measurements, that you need. You can use timer component in the form to implement this simply. On each timer tick - check, is it second already.
onClick event must first remember what time is now, in absolute values, stop timer, then calculate difference between start and stop time.
Should work.
Robin Panther
|
|
|
|
|
Thanks Robin, I was thinking of something like that, I just wasn't sure if there was something similar to the sleep method which allowed messages to pass. I'll have a go at implementing it that way.
Many thanks
Nick
|
|
|
|
|
Put a timer on the form that fires after a second. Then you just have to sit back and wait for events, and see if the click or tick fires first.
---
b { font-weight: normal; }
|
|
|
|
|
Hi all,
im looking for a file upload manager for C#. something that will allow large uploads of files to a website (separate from the site experience) as well as mange the upload so it can resume if connection has been terminated. Anyone know of anything out there that does this?
thanks
mcm
|
|
|
|
|
Hey,
Why don't u use file uploader that coming with VS 2005. Using that v can upload more than 10 MB.
Nothing's Forgotten, nothing's ever forgotten !
|
|
|
|
|
unfortunately we are developing for v1.1 currently and cannot use v2 stff. I found a good article on Dime buffered uploads that im going to play with today though. Also we need to be able to upload files that range from 10 - 500 megs, and we need something that handles those pesky IIS timeouts.
thanks
mcm
|
|
|
|
|
in my mouse move event how can I tell if the user is holding down the shift key?
|
|
|
|
|
|
Thank you! that worked.. before your response I found a few crazy methods of importing user32.dll etc. This is exactly what I was hoping for. I am a bit confused as to how it works..
what is Control ? the current control in focus? I was expecting using sender or e to find the data.
if (Control.ModifierKeys == Keys.Shift) <br />
{<br />
<br />
.........<br />
<br />
}
|
|
|
|
|
ModifierKeys is a static property - which just calls the Win32 API "GetKeyState".
This doesn't require any state information (like 'sender' or 'e') - and can basically be called from anywhere at any time.
|
|
|
|
|
i want to convert from RGB to LUV color space
how can i do that?
haitham
|
|
|
|
|
A great resource for colour conversions is easyRGB. You will have to convert the colour to XYZ first.
|
|
|
|