|
I'm not sure I understand. You got null back for the control returned?
|
|
|
|
|
Wouldn't MouseEnter / MouseLeave or whatever work?
|
|
|
|
|
If you wanted an event for every menuitem. I was hoping there was a cleaner way.
PIEBALDconsult wrote: Wouldn't MouseEnter / MouseLeave or whatever work?
Programmer
Glenn Earl Graham
Austin, TX
|
|
|
|
|
Hi,
I have not used it myself, but the way I understand MSDN on Control.HelpRequested event
you should add an event to every Control for which you want to provide help; then in
the HelpRequested event handler the sender parameter points to the Control that currently
needs to show help.
|
|
|
|
|
For the menu dropdown items there is no event for the helpprovider. There is for the file menu itself but it does not tell you which menu item you are currently looking at.
Luc Pattyn wrote: I have not used it myself, but the way I understand MSDN on Control.HelpRequested event
you should add an event to every Control for which you want to provide help; then in
the HelpRequested event handler the sender parameter points to the Control that currently
needs to show help.
Programmer
Glenn Earl Graham
Austin, TX
|
|
|
|
|
OK, I see the problem now: MenuItem is not a Control. However MainMenu and ContextMenu
are, so you could enumerate their menu items recursively to find the one that is currently
selected (MenuItem.Selected property). Not sure what will happen when you move the
mouse up or down, selecting another menu item.
|
|
|
|
|
Thank You very much. It works like a champ! Here is my final code (c++/CLI).
for each ( ToolStripMenuItem ^tmpMS in this->menuMainForm->Items )
{
for each ( ToolStripItem ^tmpCntl in tmpMS->DropDownItems )
{
if (tmpCntl)
{
if ( tmpCntl->Selected )
String ^tmpCntlName = tmpCntl->Name;
OpenHelpForMenuItem(tmpCntlName);
}
}
}
Programmer
Glenn Earl Graham
Austin, TX
|
|
|
|
|
hi.. how do i browse a word document and get the data inside to my richtextBox ?
|
|
|
|
|
You'll either need to use the Word interop COM object (requires Word to be installed on the machine running your software), or use a 3rd party tool that parses Word documents to get the text data out or coverts it to RTF.
|
|
|
|
|
if i want to use the Word interop COM object .. what should i do.. thanks
|
|
|
|
|
|
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
|
|
|
|