Click here to Skip to main content
15,885,278 members
Home / Discussions / C#
   

C#

 
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 
GeneralRe: File transfer Pin
yesu prakash15-Apr-09 2:59
yesu prakash15-Apr-09 2:59 
GeneralRe: File transfer Pin
buachaill cliste15-Apr-09 3:58
buachaill cliste15-Apr-09 3:58 
JokeThat was a dumb answer. Pin
Naruki15-Apr-09 15:16
Naruki15-Apr-09 15:16 
GeneralRe: That was a dumb answer. Pin
yesu prakash16-Apr-09 17:55
yesu prakash16-Apr-09 17:55 
Questionbyte[] size limit Pin
yesu prakash14-Apr-09 17:57
yesu prakash14-Apr-09 17:57 
AnswerRe: byte[] size limit Pin
Christian Graus14-Apr-09 18:43
protectorChristian Graus14-Apr-09 18:43 
GeneralRe: byte[] size limit Pin
yesu prakash14-Apr-09 20:44
yesu prakash14-Apr-09 20:44 
GeneralRe: byte[] size limit Pin
Guffa14-Apr-09 20:46
Guffa14-Apr-09 20:46 
GeneralRe: byte[] size limit Pin
Christian Graus14-Apr-09 22:03
protectorChristian Graus14-Apr-09 22:03 
AnswerRe: byte[] size limit Pin
Mirko198014-Apr-09 21:47
Mirko198014-Apr-09 21:47 

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.