Click here to Skip to main content
15,897,704 members
Home / Discussions / C#
   

C#

 
AnswerRe: Importing a DLL at runtime Pin
Luis Alonso Ramos5-Sep-05 7:26
Luis Alonso Ramos5-Sep-05 7:26 
QuestionHow to find inner length (number of cols) in a rectangular array? Pin
signbit4-Sep-05 22:46
signbit4-Sep-05 22:46 
AnswerRe: How to find inner length (number of cols) in a rectangular array? Pin
Guffa4-Sep-05 22:53
Guffa4-Sep-05 22:53 
AnswerRe: How to find inner length (number of cols) in a rectangular array? Pin
Andrew Kirillov4-Sep-05 22:56
Andrew Kirillov4-Sep-05 22:56 
GeneralRe: How to find inner length (number of cols) in a rectangular array? Pin
signbit4-Sep-05 23:00
signbit4-Sep-05 23:00 
QuestionCrystal Report Pin
| Muhammad Waqas Butt |4-Sep-05 22:27
professional| Muhammad Waqas Butt |4-Sep-05 22:27 
QuestionMulti Line TextBox for Addresses Pin
Greeky4-Sep-05 22:19
Greeky4-Sep-05 22:19 
AnswerRe: Multi Line TextBox for Addresses Pin
philip_cole4-Sep-05 23:21
philip_cole4-Sep-05 23:21 
Hi Greeky,

Well the easy way is to set the AcceptsReturn property of the textbox to true. That should let them press enter onto new lines.
If you want to do it manually, just change the code to the following (converted to c# from interesting vb hybrid)

<br />
protected void txtAddress_KeyUp(........) {<br />
  if(e.key == keys.enter)<br />
  {<br />
    txtaddress.Text += environment.newline;<br />
    txtaddress.SelectionStart = txtaddress.Text.Length-1;<br />
    txtaddress.SelectionLength = 0;<br />
  }<br />
}<br />
/* NB. This may not be quite right, as my VS is ill, so didnt test it */<br />


The two lines to note are setting SelectionStart and SelectionLength. This just says move the cursor to the last character, and make sure no text is selected.

Hope this helps
Philip Big Grin | :-D
GeneralRe: Multi Line TextBox for Addresses Pin
Greeky4-Sep-05 23:26
Greeky4-Sep-05 23:26 
Question[Message Deleted] Pin
bruno cortona4-Sep-05 22:14
bruno cortona4-Sep-05 22:14 
AnswerRe: VS .NET 2003 hangs on NullReferenceException Pin
Andy Brummer5-Sep-05 4:22
sitebuilderAndy Brummer5-Sep-05 4:22 
GeneralRe: VS .NET 2003 hangs on NullReferenceException Pin
bruno cortona5-Sep-05 5:22
bruno cortona5-Sep-05 5:22 
Questionunsafe code Pin
Sheel Gohe4-Sep-05 22:00
Sheel Gohe4-Sep-05 22:00 
QuestionC# DLL in VC++ / MFC Pin
Anonymous4-Sep-05 21:40
Anonymous4-Sep-05 21:40 
AnswerRe: C# DLL in VC++ / MFC Pin
Anonymous5-Sep-05 2:24
Anonymous5-Sep-05 2:24 
Questiondetermining if a string contains an int Pin
Tyrus1824-Sep-05 21:04
Tyrus1824-Sep-05 21:04 
AnswerRe: determining if a string contains an int Pin
Guffa4-Sep-05 21:16
Guffa4-Sep-05 21:16 
AnswerRe: determining if a string contains an int Pin
Alsvha4-Sep-05 21:17
Alsvha4-Sep-05 21:17 
Answer[Message Deleted] Pin
Mark Greenwood4-Sep-05 21:25
Mark Greenwood4-Sep-05 21:25 
Questiona question about config file for windows service program Pin
Bright Zhang4-Sep-05 19:23
Bright Zhang4-Sep-05 19:23 
AnswerRe: a question about config file for windows service program Pin
Andy Brummer4-Sep-05 20:39
sitebuilderAndy Brummer4-Sep-05 20:39 
GeneralRe: a question about config file for windows service program Pin
Bright Zhang4-Sep-05 21:02
Bright Zhang4-Sep-05 21:02 
QuestionHook the tab key on Window Form Pin
Duong Tien Nam4-Sep-05 17:32
Duong Tien Nam4-Sep-05 17:32 
AnswerRe: Hook the tab key on Window Form Pin
Luis Alonso Ramos4-Sep-05 20:04
Luis Alonso Ramos4-Sep-05 20:04 
AnswerRe: Hook the tab key on Window Form Pin
Sheel Gohe4-Sep-05 20:08
Sheel Gohe4-Sep-05 20:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.