Click here to Skip to main content
15,921,113 members
Home / Discussions / C#
   

C#

 
Questionaccessing remote machine using IP Address Pin
V.V.Thakur24-May-06 1:40
V.V.Thakur24-May-06 1:40 
AnswerRe: accessing remote machine using IP Address Pin
Ed.Poore24-May-06 3:58
Ed.Poore24-May-06 3:58 
QuestionContextmenu Shell Extension problem Pin
Larantz24-May-06 1:27
Larantz24-May-06 1:27 
AnswerRe: Contextmenu Shell Extension problem Pin
Larantz25-May-06 21:52
Larantz25-May-06 21:52 
QuestionHow to accept double values using textbox Pin
praveenqwe24-May-06 1:19
praveenqwe24-May-06 1:19 
AnswerRe: How to accept double values using textbox Pin
rah_sin24-May-06 1:23
professionalrah_sin24-May-06 1:23 
GeneralRe: How to accept double values using textbox Pin
praveenqwe24-May-06 1:41
praveenqwe24-May-06 1:41 
AnswerRe: How to accept double values using textbox [modified] Pin
Bayli24-May-06 1:26
Bayli24-May-06 1:26 
Hello,

One way is to do it like this (dNumber defined earlier, and in this case textbox is named txtBox):

double dNumber;<br />
<br />
try <br />
{<br />
	dNumber = double.Parse(txtBox.Text);<br />
}<br />
catch(FormatException)<br />
{<br />
	MessageBox.Show("You typed an invalid value\n\r" +<br />
			"Please try again");<br />
}


This diplays an errorbox in case user puts in wrong kind of an input.

-PP

-- modified at 7:29 Wednesday 24th May, 2006
QuestionAccessing main form from user component Pin
Bayli24-May-06 1:13
Bayli24-May-06 1:13 
AnswerRe: Accessing main form from user component Pin
stancrm24-May-06 1:36
stancrm24-May-06 1:36 
GeneralRe: Accessing main form from user component Pin
Bayli24-May-06 2:00
Bayli24-May-06 2:00 
QuestionArrayList help? Pin
eric_tran24-May-06 1:09
eric_tran24-May-06 1:09 
AnswerRe: ArrayList help? [modified] Pin
J4amieC24-May-06 1:12
J4amieC24-May-06 1:12 
GeneralRe: ArrayList help? [modified] Pin
Larantz24-May-06 1:16
Larantz24-May-06 1:16 
AnswerRe: ArrayList help? [modified] Pin
User 665824-May-06 1:33
User 665824-May-06 1:33 
GeneralRe: ArrayList help? [modified] Pin
J4amieC24-May-06 1:46
J4amieC24-May-06 1:46 
GeneralRe: ArrayList help? [modified] Pin
User 665824-May-06 2:00
User 665824-May-06 2:00 
AnswerRe: ArrayList help? Pin
eric_tran24-May-06 2:24
eric_tran24-May-06 2:24 
AnswerRe: ArrayList help? Pin
eric_tran24-May-06 2:31
eric_tran24-May-06 2:31 
Questiona few important questions about forms ? Pin
cmpeng3424-May-06 0:37
cmpeng3424-May-06 0:37 
AnswerRe: a few important questions about forms ? Pin
J4amieC24-May-06 1:05
J4amieC24-May-06 1:05 
AnswerRe: a few important questions about forms ? Pin
rah_sin24-May-06 1:09
professionalrah_sin24-May-06 1:09 
QuestionHelp me how to gets "%Systemroot%" directory? Pin
khanfresh23-May-06 23:59
khanfresh23-May-06 23:59 
AnswerRe: Help me how to gets &quot;%Systemroot%&quot; directory? [modified] Pin
User 665824-May-06 0:59
User 665824-May-06 0:59 
Questioncall event click Pin
ltxuan23-May-06 23:53
ltxuan23-May-06 23:53 

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.