Click here to Skip to main content
15,891,513 members
Home / Discussions / C#
   

C#

 
QuestionC# Doubt Pin
crrajaguru14-Apr-09 21:36
crrajaguru14-Apr-09 21:36 
AnswerRe: C# Doubt Pin
Christian Graus14-Apr-09 22:05
protectorChristian Graus14-Apr-09 22:05 
QuestionWhat's the responsibility of controller? Pin
calendarw14-Apr-09 21:10
calendarw14-Apr-09 21:10 
AnswerRe: What's the responsibility of controller? Pin
crrajaguru14-Apr-09 21:41
crrajaguru14-Apr-09 21:41 
GeneralRe: What's the responsibility of controller? Pin
calendarw14-Apr-09 21:58
calendarw14-Apr-09 21:58 
QuestionUpside down printer Pin
damichab14-Apr-09 20:48
damichab14-Apr-09 20:48 
AnswerRe: Upside down printer Pin
benjymous14-Apr-09 22:08
benjymous14-Apr-09 22:08 
GeneralRe: Upside down printer Pin
damichab15-Apr-09 0:36
damichab15-Apr-09 0:36 
GeneralRe: Upside down printer Pin
benjymous15-Apr-09 2:07
benjymous15-Apr-09 2:07 
QuestionHow to export images to Excel Pin
prajeesh14-Apr-09 19:41
prajeesh14-Apr-09 19:41 
AnswerRe: How to export images to Excel Pin
Christian Graus14-Apr-09 19:52
protectorChristian Graus14-Apr-09 19:52 
GeneralRe: How to export images to Excel Pin
prajeesh14-Apr-09 21:36
prajeesh14-Apr-09 21:36 
GeneralRe: How to export images to Excel Pin
Christian Graus14-Apr-09 22:16
protectorChristian Graus14-Apr-09 22:16 
QuestionCreated setup for C# windows application which should also install .net runtime incase not installed Pin
ptr_Electron14-Apr-09 19:08
ptr_Electron14-Apr-09 19:08 
AnswerRe: Created setup for C# windows application which should also install .net runtime incase not installed Pin
Abhijit Jana14-Apr-09 19:31
professionalAbhijit Jana14-Apr-09 19:31 
GeneralRe: Created setup for C# windows application which should also install .net runtime incase not installed Pin
ptr_Electron15-Apr-09 0:00
ptr_Electron15-Apr-09 0:00 
AnswerRe: Created setup for C# windows application which should also install .net runtime incase not installed Pin
Christian Graus14-Apr-09 19:51
protectorChristian Graus14-Apr-09 19:51 
QuestionIn C# Express, what's best way to get IP Address from user? Pin
Naruki14-Apr-09 19:06
Naruki14-Apr-09 19:06 
C# newb here. I've gone down the rabbit hole trying to find the answer myself, so I am asking here.

In my windows form, I want to prompt the user to enter an IP address. I made a popup dialog with a MaskedTextBox (mask was 990.990.990.990). This worked, but it required the user to fill in every character (even if he just had to press the arrow key or spacebar, that is kind of annoying).

I tried other masks (like 099.099.099.099), but nothing makes that annoyance go away.

So I decided to make 4 separate text boxes. This adds the ability to easily tab to the next octet, but it takes away the nice Copy/Paste ability to dump in an IP from the clipboard.

So I started looking for some kind of OnPaste event that I could handle and have it disburse pasted addresses automagically. There doesn't appear to be such an event.

I found several explanations of how to intercept Ctrl-V or Shift-Ins key combinations, but that is an incomplete solution; I want to catch all possible paste methods.

I was thinking about overriding the IsInputKey method somehow, but I don't know how to do that without creating a custom control (which just seems like massive overkill to me).

In Java, I could override the method at instantiation like so:
this.maskedTextBox1 = new System.Windows.Forms.MaskedTextBox() {
   protected override bool IsInputKey(Keys AKeyData) {...}
};

But that doesn't seem to work in C#.

So what's the best way to accomplish what I want to do?

My other signature is a Porche.

AnswerRe: In C# Express, what's best way to get IP Address from user? Pin
benjymous14-Apr-09 22:14
benjymous14-Apr-09 22:14 
GeneralRe: In C# Express, what's best way to get IP Address from user? Pin
Luc 64801114-Apr-09 22:26
Luc 64801114-Apr-09 22:26 
GeneralRe: In C# Express, what's best way to get IP Address from user? Pin
Naruki14-Apr-09 23:01
Naruki14-Apr-09 23:01 
GeneralRe: In C# Express, what's best way to get IP Address from user? Pin
Skymir15-Apr-09 7:54
Skymir15-Apr-09 7:54 
GeneralRe: In C# Express, what's best way to get IP Address from user? Pin
Naruki14-Apr-09 22:32
Naruki14-Apr-09 22:32 
QuestionFile transfer Pin
yesu prakash14-Apr-09 18:07
yesu prakash14-Apr-09 18:07 
AnswerRe: File transfer Pin
Christian Graus14-Apr-09 18:42
protectorChristian Graus14-Apr-09 18:42 

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.