|
You can't add an item to a Dictionary<> with a key that is already in use. Try:
messages.Add(name,"message 1");
if(messages.ContainsKey(name) == true)
{
messages[key] += "\nMessage2";
}
|
|
|
|
|
Good Morning,
i have a problem!
i have a form with a DataGrid.
the form have a KeyPreview properties and i placed it to true.
the form events "KeyPress" i placed the following code:
if (e.KeyChar == (char)13)
SendKeys.Send("{TAB}")
so when i click on enter and the focus is on datagrid on the first row, so the focus goes to third row and not on second.
what's the problem??
Thanks a lot!
|
|
|
|
|
I think you don't need to capture Enter key in DataGridView. Because normally pressing Enter causes to focus goes to next line. For activating movement by "Enter" instead of "Tab" use below code :
<br />
Form_KeyDown()<br />
{<br />
this.SelectNextControl();<br />
}<br />
Don't forget to set all controls TabIndex property.
|
|
|
|
|
Thanks dude!
i didn't know that DataGridView has this movement by "Enter" instead of "Tab", without need to use code.
it was a good tip.
Thank you a lot.
|
|
|
|
|
Hi, I'm looking for a ListView exactly like the Properties panel in VS.NET. Where can I get one?
Thanks!
|
|
|
|
|
|
I have VS.NET 2003 with the .NET framework 1.1 and I don't have such an item in my toolbox! How do I get it?
|
|
|
|
|
Right click the toolbar and select "Choose Items" on the context menu.
led mike
|
|
|
|
|
This is unbeleivable. How did they get the idea of not putting it in right from the beginning!?
|
|
|
|
|
I'm writing a c# app that sends out emails to the developers and managers in the dept. The devs all use outlook and receive an HTML email with nice formatting etc.
The managers like to get their email on the run so might need to receive it on a blackberry. I've now made the email multipart with a text part aswell as an html part but i have no idea how to make sure that the formatting looks ok in plain text. Is there a blackberry email emulator around? Does anyone even know if they have constant screen width?
The biggest problem is that the management data is all tabular and i can see it turning into a huge mess if the formatting isn't good.
If anyone has done something similar in the past i'd love to hear how you wen about it.
Thanks
Russell.
|
|
|
|
|
I have found that finding the max amount of characters the screen can display at a time is the easiest way to format for a specific device. What I do is send an email like so:
1
22
333
4444
55555
666666
7777777
88888888
999999999
1011111111
11000000000
120000000000
1300000000000
ect...
then find the line that does not fit and you'll see how many characters it can display. Keep in mind that the amound of characters can change if you don't have a truetype font or if the characters change in size.
Hope that helps.
(You will need to see one of the managers phones for that to work.)
The only way to speed up a Macintosh computer is at 9.8 m/sec/sec.
|
|
|
|
|
ExpertComing wrote: (You will need to see one of the managers phones for that to work.)
Have you ever tried to wrestle a crackberry from a manager?
I was afraid I might have to do that. I might also be able to get someone to forward something that is formatted well on a blackberry and see how the page is put together
Thanks for the suggestions
Russell
|
|
|
|
|
Hi,
Basically what i want to do is to prevent the webBrowser control to stroe the page information in the internet explorer history.. is there any way to do this?
regards
Q@!$3r
|
|
|
|
|
use it...
<%@ OutputCache Duration="0" Location="None" VaryByParam="none" %>
or
VB.NET
Response.Cache.SetCacheability(HttpCacheability.NoCache)
C#
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Parwej Ahamad
g_parwez@rediffmail.com
|
|
|
|
|
well i am using windows form and I think this is for web,,,, sorry if I am wrong..
Q@!$3r
|
|
|
|
|
|
I use response.write() function to send "window.location.hash='anchor'" command to client-end page in .cs file.
It could work good in IE, but not in firefox 2.0. why? how to resolve it? thanks.
|
|
|
|
|
I assume you are referring to javascript? Use DOM methods rather than response.write on the client-side.
Also, IE and FF render and behave differently. For best results, design and test in FF and then port to IE. You will save months!
File Not Found
|
|
|
|
|
could you mind give me some small samples about how to use DOM? Thank you very very much.
|
|
|
|
|
if you have a div whose id attribute is testDiv
function doStuff(){
document.getElementById("testDiv").innerHTML = "I did something";
}
Unfortunately, it is buggy in IE. But IE does support innerText.
File Not Found
|
|
|
|
|
i use window.location.hash just for scroll the page to <anchor>. how should i use DOM to do?
|
|
|
|
|
If you want to scroll the page maybe use anchors? (don't know if it will work here)
Try this
Here
Didn't work so I removed the long breaks
File Not Found
|
|
|
|
|
I defined the anchors.
Could you let me see the sample's source code? Thanks.
By the way, how to use anchors to control the scroll?
|
|
|
|
|
When someone clicks on an anchor the user agent is supposed to direct to it. And in the case of a page anchor, scroll. See the link for more information. Also, I think there is a DOM method to fire the click event? but I do not know.
http://www.w3schools.com/html/html_links.asp
File Not Found
|
|
|
|
|
Thanks a lot.
I want to use c# to control the page scroll. So, the client event maybe doesn't fit this scene.
|
|
|
|