|
|
Hi all,
How could i trim the calender control (Cla.selecteddate) to only dat
when i click the control it comes with time .But i only want the date only.Like '2008-01-10' not like 2008-01001 12:00:00Am'
Thank you!
|
|
|
|
|
Use the ToShortDateString or ToLongDateString methods.
Standards are great! Everybody should have one!
|
|
|
|
|
I don't know what a Cla.selecteddate is, but if you're use a DateTimePicker you can set a CustomFormat.
|
|
|
|
|
Thank you.
Its like ..........
I have a calender control called Cal
datetime date=Cal.selecteDate;
Then date becomes like '2008-01-01 12:00:00Am' how ever i want it like
'2008-10-01' date only.
Thanks
|
|
|
|
|
Ohhhh... I see now. A DateTime will always contain both a date and a time.
Your "calender control" should be able to display only the parts you want to display.
|
|
|
|
|
I want to incorporate the speech training UI (SAPI 5.1) into an application so that users don't have to navigate to it via the control panel.
I've tried finding C# code-snippets/examples of the DisplayUI method of the IspRecognizer interface and have so far been unsuccessful (googled and CP).
Any help or pointers would be gratefully accepted.
Regards
Guy Thiebaut
You always pass failure on the way to success.
|
|
|
|
|
Ok - I've figured out how to do this in VB.
Noooooooooooooooooo I hear you say - well trust me I feel the shame
I feel soooo dirty I'm going to have to have a long shower to clean myself
Note the Microsoft.Speech.Object Library reference needs to be added to the project first.
<br />
Imports SpeechLib<br />
Imports Speech<br />
<br />
Public WithEvents RC As SpSharedRecoContext<br />
Public myGrammar As ISpeechRecoGrammar<br />
<br />
RC = New SpSharedRecoContext<br />
<br />
myGrammar = RC.CreateGrammar<br />
myGrammar.DictationSetState(SpeechRuleState.SGDSActive)<br />
<br />
Dim theRecognizer As ISpeechRecognizer<br />
theRecognizer = RC.Recognizer<br />
<br />
theRecognizer.DisplayUI(Me.Handle.ToInt64, "Speech Training", SpeechStringConstants.SpeechUserTraining, vbNullString)<br />
Apologies for posting this filth VB code on the C# forum
You always pass failure on the way to success.
modified on Monday, January 07, 2008 4:22:30 PM
|
|
|
|
|
Hi,Can anybody help me out how to configure the PPPOE settings in windows vista OS using C# .I have to provide username ,password and connection name values though my code without displaying the internet connetion window interface to the users.
Thanks
|
|
|
|
|
Hi All :
I want to make a progress par when it's moving it's move to right and left , any idea to make it ???
Thanks
|
|
|
|
|
You'll probably need to custom draw the progress bar. Look into the System.Windows.Forms.VisualStyles namespace and the System.Windows.Forms.VisualStyles.VisualStyleElement.ProgressBar for drawing a Windows progress bar. You can then do reversal by doing some transformation on the graphics surface you're drawing on.
*edit* Mark's answer is better. Use his advice.
|
|
|
|
|
progressBar1.RightToLeftLayout = true;
progressBar1.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
EDIT...
Missread
set the style property to Marquee
|
|
|
|
|
Hi, I would like to know how to convert a double to string.
Example:
double = 3,456,789.30
string equivalent = three million four hundred fifty-six thousand and seven hundred eighty-nine & 30/100
Thanks a lot! I really need this.
|
|
|
|
|
Theres no built in soltuion for this in C# or the .Net Framework, but google[^] has lots of results.
|
|
|
|
|
digitNames = new string[] { "", "one", "two" ... };
tensDigitNames = new string[] { "", "ten-", "twenty-", "thirty-" ... };
magnitudeNames = new string[] { "", " thousand", " million" ... };
1. Initialize a string called "result" to the fractional part preceded with an "&"
2. Initialize an integer array called "number" of the digits of the number, from LSD to MSD
(in your example, {9, 8, 7, ... 3})
3. Iterate through the digits in "number" to get the variables "curDigit" and "curDigitIdx"
4. Perform the following logic using curDigitIdx (the index in your array) and curDigit
switch (curDigitIdx % 3) {
case 0:
result = string.Format("{0}{1} {2}", digitNames[curDigit],
magnitudeNames[curDigitIdx / 3], result);
break;
case 1:
result = string.Format("{0}{1}", tensDigitNames[curDigit], result);
break;
case 2:
result = string.Format("{0} hundred {1}", digitNames[curDigit], result);
break;
} Note that the preceding code is simply a starting point, and that the formatting will require a number of special cases (such as getting 11 to be printed as "eleven" as opposed to "ten-one" and 50 being printed as "fifty" instead of "fifty-". Hope this helps,
Sounds like somebody's got a case of the Mondays
-Jeff
|
|
|
|
|
|
|
How to Display Moving messages in Internet Explorer(browser) Status Bar using C# Code?
|
|
|
|
|
Outside of Silverlight you can't use C# code to affect the IE message bar. You have to use JavaScript (or VBScript if you're feeling really perverse).
|
|
|
|
|
ok.
Can u please tell me the code in javascript ,and how to do this?
|
|
|
|
|
Hi,
you can perform a browser's "View Source" on any web page that does what you want,
and look at the code they use to do it...
|
|
|
|
|
|
Hi!
I've got a string:
string str = ">200 <=250";
and a regular expression:
Regex rx = new Regex ("^(>=?|<=?|=) *[0-9]+ *$");
the way I see it (understand regex) with
rx.Matches(str);
I should get two matches (">200" and "<=250")
but I get an empty collection..
did I do something wrong?
thanks for any help!!
Seishin
life is study!!!
|
|
|
|
|
You probably want this:
Regex rx = new Regex ("(>=|<=|=)\d+");
x.Matches(str);
This matches all numbers with a ">", ">=", "<=" before it, no matter where in the text it is. It also matches in-text, it would for example also match "thisisatext>=500", which you could exclude by adding "\b"'s for word-end-checking, like this:
Regex rx = new Regex ("\b(>=|<=|=)\d+\b");
|
|
|
|
|
thanks..
"(>=?|<=?|=) *\d+"
works fine.. i wanted to match '>' '<' as well so i had to add '?' after '='.
life is study!!!
|
|
|
|