Click here to Skip to main content
15,888,454 members
Home / Discussions / C#
   

C#

 
GeneralRe: Client to Client TCP Chat program Pin
nitin_ion28-Sep-11 21:01
nitin_ion28-Sep-11 21:01 
GeneralRe: Client to Client TCP Chat program Pin
BobJanova28-Sep-11 22:35
BobJanova28-Sep-11 22:35 
GeneralRe: Client to Client TCP Chat program Pin
Richard MacCutchan28-Sep-11 3:58
mveRichard MacCutchan28-Sep-11 3:58 
GeneralRe: Client to Client TCP Chat program Pin
nitin_ion28-Sep-11 21:09
nitin_ion28-Sep-11 21:09 
Questionhow to disable the GotFocus on textbox? Pin
Gali197827-Sep-11 20:11
Gali197827-Sep-11 20:11 
AnswerRe: how to disable the GotFocus on textbox? Pin
Mycroft Holmes27-Sep-11 21:11
professionalMycroft Holmes27-Sep-11 21:11 
AnswerRe: how to disable the GotFocus on textbox? Pin
xavjer28-Sep-11 3:48
xavjer28-Sep-11 3:48 
AnswerRe: how to disable the GotFocus on textbox? Pin
Eddy Vluggen28-Sep-11 7:42
professionalEddy Vluggen28-Sep-11 7:42 
Gali1978 wrote:
how i can disable the GotFocus on this textbox ?

C#
textBox1.GetFocus -= this.textBox1_GotFocus;


Gali1978 wrote:
and how to enable it back ?

C#
textBox1.GetFocus += this.textBox1_GotFocus;


Alternatively, you could set a flag to indicate your "disabledness" and act on that;
C#
bool isFocusEnabled = false;

void this.textBox1_GotFocus(object sender, EventArgs e)
{
  if (!isFocusEnabled) then return; // exit the method if the flag is set
}
That'd allow you to disable/enable the execution of the event with a simple boolean.
Bastard Programmer from Hell Suspicious | :suss:

QuestionLower resolution of .PDF Pin
Steve van Niman27-Sep-11 11:30
Steve van Niman27-Sep-11 11:30 
AnswerRe: Lower resolution of .PDF Pin
Dave Kreskowiak27-Sep-11 13:05
mveDave Kreskowiak27-Sep-11 13:05 
AnswerRe: Lower resolution of .PDF Pin
Alan Balkany28-Sep-11 5:42
Alan Balkany28-Sep-11 5:42 
AnswerRe: Lower resolution of .PDF Pin
BobJanova28-Sep-11 22:52
BobJanova28-Sep-11 22:52 
QuestionSQL SERVER 2008 Express Backup and Restore using SMO does not effect database Pin
kutbinayi27-Sep-11 5:19
kutbinayi27-Sep-11 5:19 
AnswerCrosspost Pin
Eddy Vluggen27-Sep-11 6:22
professionalEddy Vluggen27-Sep-11 6:22 
GeneralRe: SQL SERVER 2008 Express Backup and Restore using SMO does not effect database Pin
kutbinayi27-Sep-11 6:30
kutbinayi27-Sep-11 6:30 
GeneralRe: SQL SERVER 2008 Express Backup and Restore using SMO does not effect database Pin
Eddy Vluggen27-Sep-11 6:36
professionalEddy Vluggen27-Sep-11 6:36 
GeneralRe: SQL SERVER 2008 Express Backup and Restore using SMO does not effect database Pin
kutbinayi27-Sep-11 6:41
kutbinayi27-Sep-11 6:41 
AnswerRe: SQL SERVER 2008 Express Backup and Restore using SMO does not effect database Pin
Eddy Vluggen27-Sep-11 6:48
professionalEddy Vluggen27-Sep-11 6:48 
GeneralRe: SQL SERVER 2008 Express Backup and Restore using SMO does not effect database Pin
kutbinayi27-Sep-11 7:53
kutbinayi27-Sep-11 7:53 
GeneralRe: SQL SERVER 2008 Express Backup and Restore using SMO does not effect database Pin
Eddy Vluggen27-Sep-11 8:19
professionalEddy Vluggen27-Sep-11 8:19 
GeneralRe: SQL SERVER 2008 Express Backup and Restore using SMO does not effect database Pin
kutbinayi27-Sep-11 8:29
kutbinayi27-Sep-11 8:29 
AnswerRe: SQL SERVER 2008 Express Backup and Restore using SMO does not effect database Pin
Eddy Vluggen27-Sep-11 8:35
professionalEddy Vluggen27-Sep-11 8:35 
GeneralRe: SQL SERVER 2008 Express Backup and Restore using SMO does not effect database Pin
kutbinayi27-Sep-11 8:48
kutbinayi27-Sep-11 8:48 
GeneralRe: SQL SERVER 2008 Express Backup and Restore using SMO does not effect database Pin
Eddy Vluggen27-Sep-11 11:55
professionalEddy Vluggen27-Sep-11 11:55 
Question(Rich)TextBox problem! Pin
OlivierPD27-Sep-11 4:07
OlivierPD27-Sep-11 4:07 

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.