|
Hello
I have something of a silly question =)
I have buttons I want the user to be able to access with quickcommands. I have already set the apropriate keys, but how do I underline for an example the s in save in a button.text?
|
|
|
|
|
Hi!
Just prefix the letter you want to be underlined with an ampersand.
So the Text for your Save button would be "&Save".
mav
|
|
|
|
|
<br />
private System.Windows.Forms.Button cmdTest;<br />
this.cmdTest = new System.Windows.Forms.Button();<br />
<br />
this.cmdTest.Text = "&Save";<br />
When the form is loaded and the button shows, you might not see the S underlined until you press the "Alt" button. I just tested this - I brought up the form and typed ALT-S and it fired the event (simple message box).
|
|
|
|
|
i would like to use TAPI with C#,can u help me from where to start,thnx
|
|
|
|
|
That depends entirely on what TAPI is
|
|
|
|
|
There are various C# wrappers that will let you use TAPI (Telephony API) in C#. The problem is, none of them completely wrap the API. Also, there are serious issues with using TAPI 3.0 from managed code. You might want to search www.GotDotNet.com User Samples section for "TAPI".
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
You'll have to consult the MSDN documentation on the OS version your using to see what it supports as far as TAPI. The embedded/mobile operating systems don't support the full TAPI API's.
You can start here[^]. I can't go any further becuase I've never done any kind of TAPI-based development and I rarely do embedded development.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I have the following URL:
http://citeseer.ist.psu.edu/rd/55811103,653,1,0.25,Download/http://citeseer.ist.psu.edu/cache/papers/cs/7145/http:zSzzSzwww.stanford.eduzSzclasszSzcs343zSzpszSzpathprof.pdf/ball96efficient.pdf
Creating System.Uri with the above URL:
Uri uri = new Uri(aboveURL)
removes the extra slash after "Download/http://". The debugger shows it as
Download/http:/citeseer.ist....
The Uri in HttpWebRequest (which is created with the above URL) also removes
the extra slash. As a result, I get NameResolution exception.
The Uri is shown as
http://citeseer.ist.psu.edu/rd/55811103,653,1,0.25,Download/http:/citeseer.ist.psu.edu/cache/papers/cs/7145/http:zSzzSzwww.stanford.eduzSzclasszSzcs343zSzpszSzpathprof.pdf/ball96efficient.pdf
|
|
|
|
|
|
Using HttpUtility.Encode results in System.Uri throwing an exception, since it can't process the encoded info.
Uri uri = new Uri(HttpUtility.UrlEncode(url));
|
|
|
|
|
I have a co-worker that created an form in Access 2000. In order to use it every where I need to install MS Access 2000. How can I show this form in MFC and allow the end user to use it without having to install MS Access 2000 on all PC's?
Thanks
This is also posted on the VC++ forum.
Tom Wright
tawright915@yahoo.com
|
|
|
|
|
You should probably remove the reference to MFC in the C# forum.
Whatever language you use, you can write a program that reproduces the form, and does the same work to the data in the database. I doubt you can just host the existing form in an outside program.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
You can't use the form he created in Access 2000 without installing Access 2000.
You'll have to recode the form using whatever language you like and duplicate the functionality that you need.
Tom Wright wrote:
This is also posted on the VC++ forum.
:SMACK!: Cross-posting is considered very rude! Especially when you post the question in a forum that has nothing to do with the language your using...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I have a problem using InvokeMember.
When calling the method I have:
t.InvokeMember(widget.InitMethod, BindingFlags.DeclaredOnly |BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.InvokeMethod, null, newWidget, widget.Parameters);
Info on vars:
newWidget is a object of the class WSlider. WSlider has a method called InitSlider(int,int,int).
widget.Parameters is a object array which holds 3 int values. widget.InitMethod holds "InitSlider".
Now, this just throws me a MissingMethodException. It works fine with one parameter, but as soon as I add more it crashes. Anyone got a clue on this?
|
|
|
|
|
case-block was followed by a ;
too many hours up.
|
|
|
|
|
the ; was not the problem. still open for comments!
|
|
|
|
|
What's widget.InitMethod? Are you sure the method name's right? Also, make sure you have the correct assembly loaded.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Found the problem. I had a mismatch in my data type passing methods when parsing the XML files that holds states for the new objects.
|
|
|
|
|
I am trying to crawl using the following code snippet.
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);
req.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Win32)";
...
By default, the req.AllowAutoRedirect is true and MaximumAutomaticRedirections is 50.
When I try to crawl the following URL.
http://citeseer.ist.psu.edu/rd/55811103,653,1,0.25,Download/http://citeseer.ist.psu.edu/cache/papers/cs/7145/http:zSzzSzwww.stanford.eduzSzclasszSzcs343zSzpszSzpathprof.pdf/ball96efficient.pdf
I get NameResolutionFailure exception. However, I am able to open this URL from the browser and it gets redirected to:
http://citeseer.ist.psu.edu/cache/papers/cs/7145/http:zSzzSzwww.stanford.eduzSzclasszSzcs343zSzpszSzpathprof.pdf/ball96efficient.pdf
How do I force my C# code to go to the redirected url?
|
|
|
|
|
I am trying to check a database to see if a record exists(ComputerName) in a database. If it does NOT exist, then I want to run an Insert. If it DOES exists, then I want it to update the database. It seems like I would use an IF statement, but I am unsure of how to do it.
Eric
|
|
|
|
|
SqlDataReader reader = new myCommand.ExecuteReader();
while(reader.Read())
{
if(reader[Key]== youValue)
{
}
else (
)
}
|
|
|
|
|
I'm using a popup dialog with a listbox to allow the user to set/change a parameter. In addition to selecting a value and clicking OK I'd like to allow the user to be able to doubleclick on a value and have it close with the doubleclicked value used. The problem is that I can't tell the difference between a doubleclick on an item in the box, and one in empty space below the last valid entry. IN the latter case I want to do nothing. My current handler instead returns with whatever the last valid selection was.
<br />
private void OnDoubleClickPriority(object sender, System.EventArgs e)<br />
{<br />
m_sSelectedText = m_lbPriority.GetItemText( m_lbPriority.SelectedItem );<br />
Close();<br />
}<br />
|
|
|
|
|
In the MousDown event of the listbox call the IndexFromPoint function of the ListBox with the given coordinates and assign it to some member variable. In the DoubleClick handler you can then check if an appropiate index was hit (if I remember right IndexFromPoint return -1 if no item was hit).
|
|
|
|
|
Thanks. That worked perfectly.
|
|
|
|
|
Can some one please helpe me!
I want to bulid a com addin for PowerPoint that overrides the save command to display a custom SaveAs dialog. When the user has selected the save location i want to call the "SaveAs" method of the Presentation object. The problem is that it casts an exception (unknown member). Is this a bug in PowerPoint or is there an workaround?
Thanks
Be paragmatic
|
|
|
|