Click here to Skip to main content
15,905,971 members
Home / Discussions / C#
   

C#

 
AnswerRe: Running your programs on other machines Pin
Christian Graus1-Jul-08 16:24
protectorChristian Graus1-Jul-08 16:24 
GeneralRe: Running your programs on other machines Pin
max292971-Jul-08 16:28
max292971-Jul-08 16:28 
GeneralRe: Running your programs on other machines Pin
Christian Graus1-Jul-08 16:37
protectorChristian Graus1-Jul-08 16:37 
GeneralRe: Running your programs on other machines Pin
max292971-Jul-08 16:41
max292971-Jul-08 16:41 
GeneralRe: Running your programs on other machines Pin
Christian Graus1-Jul-08 17:24
protectorChristian Graus1-Jul-08 17:24 
GeneralRe: Running your programs on other machines Pin
max292971-Jul-08 17:31
max292971-Jul-08 17:31 
QuestionTextbox/Combobox question Pin
JimWWhite1-Jul-08 14:26
JimWWhite1-Jul-08 14:26 
AnswerRe: Textbox/Combobox question Pin
Anthony Mushrow1-Jul-08 14:48
professionalAnthony Mushrow1-Jul-08 14:48 
The events Enter and Leave are for when the control gains/loses focus. So using those you could change the colours of your boxes.

You can use the event KeyDown to see what key the user has pressed before it's actuall passed to the text box so you can hadle your tab/enter keys there.

As for clearing the contents on the first key press, you'll just have to use a bool to check if its the first key press or not.

bool first = false;
OnEnter()
{
  //change colours
  first = true;
}
.
OnLeave()
{
  //change colours back
}
.
KeyDown(KeyEventArgs e)
{
  if(key is tab OR key is enter) {
    e.Handled = true;
    MyForm.Focus(); //should give the form focus, OnLeave event should fire
   }
.
  if(first)
    //clear data
.
  first = false;
}


My current favourite word is: I'm starting to run out of fav. words!
-SK Genius

Game Programming articles start -here[^]-

QuestionKeyEventArgs.SuppressKeyPress in C# Pin
ArunJoseph 47163951-Jul-08 12:28
ArunJoseph 47163951-Jul-08 12:28 
AnswerRe: KeyEventArgs.SuppressKeyPress in C# Pin
User 66581-Jul-08 12:36
User 66581-Jul-08 12:36 
GeneralRe: KeyEventArgs.SuppressKeyPress in C# Pin
ArunJoseph 47163951-Jul-08 20:51
ArunJoseph 47163951-Jul-08 20:51 
GeneralRe: KeyEventArgs.SuppressKeyPress in C# Pin
N a v a n e e t h1-Jul-08 21:02
N a v a n e e t h1-Jul-08 21:02 
GeneralRe: KeyEventArgs.SuppressKeyPress in C# Pin
ArunJoseph 47163951-Jul-08 22:06
ArunJoseph 47163951-Jul-08 22:06 
AnswerRe: KeyEventArgs.SuppressKeyPress in C# Pin
Luc Pattyn1-Jul-08 14:23
sitebuilderLuc Pattyn1-Jul-08 14:23 
GeneralRe: KeyEventArgs.SuppressKeyPress in C# Pin
ArunJoseph 47163951-Jul-08 20:57
ArunJoseph 47163951-Jul-08 20:57 
QuestionNested Datalist Selection sometimes fails when large data or clicking to fast -- Guessing Timeout ?? Ideas??? Going Crazy! Pin
Natalia_Uribe1-Jul-08 11:46
Natalia_Uribe1-Jul-08 11:46 
AnswerRe: Nested Datalist Selection sometimes fails when large data or clicking to fast -- Guessing Timeout ?? Ideas??? Going Crazy! Pin
Harvey Saayman1-Jul-08 22:39
Harvey Saayman1-Jul-08 22:39 
QuestionHow can we convert string to Brush ? Pin
Mohammad Dayyan1-Jul-08 10:42
Mohammad Dayyan1-Jul-08 10:42 
AnswerRe: How can we convert string to Brush ? Pin
User 66581-Jul-08 10:49
User 66581-Jul-08 10:49 
GeneralRe: How can we convert string to Brush ? Pin
Mohammad Dayyan1-Jul-08 15:11
Mohammad Dayyan1-Jul-08 15:11 
GeneralRe: How can we convert string to Brush ? Pin
Christian Graus1-Jul-08 15:55
protectorChristian Graus1-Jul-08 15:55 
GeneralRe: How can we convert string to Brush ? Pin
Bert delaVega1-Jul-08 18:23
Bert delaVega1-Jul-08 18:23 
AnswerRe: How can we convert string to Brush ? Pin
Bert delaVega1-Jul-08 18:43
Bert delaVega1-Jul-08 18:43 
QuestionHow to place Assemblies or DLL's in a subfolder Pin
earlgraham1-Jul-08 10:41
earlgraham1-Jul-08 10:41 
AnswerRe: How to place Assemblies or DLL's in a subfolder Pin
Pete O'Hanlon1-Jul-08 11:03
mvePete O'Hanlon1-Jul-08 11:03 

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.