Click here to Skip to main content
15,903,385 members
Home / Discussions / C#
   

C#

 
GeneralRe: pointer in C# Pin
amitmohanty12-Jul-05 6:49
amitmohanty12-Jul-05 6:49 
GeneralRe: pointer in C# Pin
Guffa12-Jul-05 7:39
Guffa12-Jul-05 7:39 
GeneralRe: pointer in C# Pin
3Dizard12-Jul-05 7:09
3Dizard12-Jul-05 7:09 
GeneralExcel Reporting using a Template Pin
Alomgir Miah12-Jul-05 4:34
Alomgir Miah12-Jul-05 4:34 
GeneralEventhandler Pin
pssuresh12-Jul-05 4:12
pssuresh12-Jul-05 4:12 
GeneralRe: Eventhandler Pin
S. Senthil Kumar12-Jul-05 4:39
S. Senthil Kumar12-Jul-05 4:39 
GeneralRe: Eventhandler Pin
Gavin Jeffrey12-Jul-05 4:43
Gavin Jeffrey12-Jul-05 4:43 
GeneralRe: Eventhandler Pin
Judah Gabriel Himango12-Jul-05 4:57
sponsorJudah Gabriel Himango12-Jul-05 4:57 
If you need to, you can write your own event arguments simply by writing a class that derives from System.EventArgs.

However, you wouldn't be able to raise the event with your new arguments unless you inherit from the TextBox class and raise it yourself with your own arguments.

Here is a common handler for both:

this.yearBuiltTextBox.Enter += new EventHandler(Parse_TextBox);
this.yearRenovateTextBox.Enter += new EventHandler(Parse_TextBox);

void ParseTextBox(object sender, EventArgs e)
{
 TextBox tbSender = (TextBox)sender;
 if(sender.Enabled == false)
 {
  return;
 }


 int min, max;
 if(tbSender == this.yearBuiltTextBox)
 {
  min = 1800;
  max = 2200;
 }
 else
 {
  min = 2400;
  max = 2800;
 }

 object parseValue = DataFormatter.ParseInteger(this.yearBuiltTextBox.Text, min, max);
}


Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Homosexuality in Christianity
Judah Himango


GeneralRe: Eventhandler Pin
J4amieC12-Jul-05 5:52
J4amieC12-Jul-05 5:52 
GeneralDatakeyfield in Datagrid Pin
livez12-Jul-05 4:07
livez12-Jul-05 4:07 
GeneralPessimistic locking Pin
rmedo12-Jul-05 3:47
rmedo12-Jul-05 3:47 
GeneralRe: Pessimistic locking Pin
Dave Kreskowiak12-Jul-05 5:56
mveDave Kreskowiak12-Jul-05 5:56 
GeneralWi-fi Pin
jonty1912-Jul-05 3:34
jonty1912-Jul-05 3:34 
GeneralRe: Wi-fi Pin
Dave Kreskowiak12-Jul-05 5:55
mveDave Kreskowiak12-Jul-05 5:55 
GeneralRe: Wi-fi Pin
jonty1912-Jul-05 6:06
jonty1912-Jul-05 6:06 
GeneralCrystal Reports help required Pin
asmyan12-Jul-05 3:27
asmyan12-Jul-05 3:27 
GeneralWindows Service Pin
the_jebus12-Jul-05 3:18
the_jebus12-Jul-05 3:18 
GeneralRe: Windows Service Pin
Dave Kreskowiak12-Jul-05 5:52
mveDave Kreskowiak12-Jul-05 5:52 
GeneralRe: Windows Service Pin
the_jebus12-Jul-05 7:26
the_jebus12-Jul-05 7:26 
GeneralRe: Windows Service Pin
Dave Kreskowiak12-Jul-05 8:10
mveDave Kreskowiak12-Jul-05 8:10 
QuestionHow to save image of a panel with panels inside it Pin
Atlemann12-Jul-05 3:01
Atlemann12-Jul-05 3:01 
GeneralSening Keys to App using directinput Pin
moongood12-Jul-05 2:55
moongood12-Jul-05 2:55 
GeneralRe: Sening Keys to App using directinput Pin
Dave Kreskowiak12-Jul-05 5:23
mveDave Kreskowiak12-Jul-05 5:23 
GeneralC++, C#, 'main' conflict and confusion Pin
outofstock12-Jul-05 2:42
outofstock12-Jul-05 2:42 
GeneralRe: C++, C#, 'main' conflict and confusion Pin
S. Senthil Kumar12-Jul-05 4:33
S. Senthil Kumar12-Jul-05 4:33 

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.