Click here to Skip to main content
15,914,419 members
Home / Discussions / C#
   

C#

 
QuestionTriggers on sqlserver Pin
vikram92915-Dec-06 19:24
vikram92915-Dec-06 19:24 
QuestionPassing a collection object to a method as a ref parameter... or not? Pin
lvanerstrom15-Dec-06 17:44
lvanerstrom15-Dec-06 17:44 
AnswerRe: Passing a collection object to a method as a ref parameter... or not? Pin
Guffa15-Dec-06 18:27
Guffa15-Dec-06 18:27 
GeneralRe: Passing a collection object to a method as a ref parameter... or not? Pin
lvanerstrom15-Dec-06 18:34
lvanerstrom15-Dec-06 18:34 
QuestionAnybody know how to upload video using ASP.NET? Pin
mujin0315-Dec-06 17:12
mujin0315-Dec-06 17:12 
AnswerRe: Anybody know how to upload video using ASP.NET? Pin
Alper Camel17-Dec-06 9:04
Alper Camel17-Dec-06 9:04 
QuestionGetting dynamic Datagrid Pin
narendrakumarp15-Dec-06 16:39
narendrakumarp15-Dec-06 16:39 
QuestionNewbie problems Pin
new to this15-Dec-06 15:10
new to this15-Dec-06 15:10 
I'm trying to change some code found on the net so that it wil read and display the result in 9 texboxes.
The for statement works i just need to find out how use 'i' in stead of tbTargetAddress'0' so that for eatch 'i' I will use an other textsbox.
Example for the code is below...

In addition I would like to change the background color of the textbox depending from the 'if' result. I've found that set {tbResponseTime10.BackColor = Color[Red]} should do the trick but again a can't find the way to integrate this in the if statement.

Thanks,
Geert

private void button1_Click(object sender, EventArgs e)
        {
            for (int i = 0; i<9;i ++)
            {
                MessageBox.Show(i.ToString());


                try
                {
                    TimeSpan span = ping.Send(tbTargetAddress0.Text, new TimeSpan(0, 0, 0,0,250));
                    if (span == TimeSpan.MaxValue)
                        tbResponseTime10.Text = "Timeout";
                    else
                        tbResponseTime10.Text = span.TotalMilliseconds.ToString("N1") + " ms";
                }
                catch (Exception ex)
                {
                    MessageBox.Show(this, ex.Message, "Could not send ping command", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }

AnswerRe: Newbie problems Pin
Guffa15-Dec-06 17:08
Guffa15-Dec-06 17:08 
QuestionCreating an own Rectangle class Pin
babbelfisken15-Dec-06 13:30
babbelfisken15-Dec-06 13:30 
AnswerRe: Creating an own Rectangle class Pin
Guffa15-Dec-06 15:58
Guffa15-Dec-06 15:58 
AnswerRe: Creating an own Rectangle class Pin
CPallini15-Dec-06 22:29
mveCPallini15-Dec-06 22:29 
Questionpersistant variable? Pin
amatbrewer15-Dec-06 13:12
amatbrewer15-Dec-06 13:12 
AnswerRe: persistant variable? Pin
Guffa15-Dec-06 17:20
Guffa15-Dec-06 17:20 
JokeRe: persistant variable? Pin
amatbrewer18-Dec-06 5:24
amatbrewer18-Dec-06 5:24 
AnswerRe: persistant variable? Pin
Luc Pattyn15-Dec-06 18:47
sitebuilderLuc Pattyn15-Dec-06 18:47 
GeneralRe: persistant variable? Pin
Guffa15-Dec-06 19:20
Guffa15-Dec-06 19:20 
GeneralRe: persistant variable? Pin
Luc Pattyn16-Dec-06 4:35
sitebuilderLuc Pattyn16-Dec-06 4:35 
GeneralRe: persistant variable? Pin
Guffa16-Dec-06 16:04
Guffa16-Dec-06 16:04 
QuestionRegex Help Pin
Expert Coming15-Dec-06 11:52
Expert Coming15-Dec-06 11:52 
AnswerRe: Regex Help Pin
Ravi Bhavnani15-Dec-06 11:58
professionalRavi Bhavnani15-Dec-06 11:58 
AnswerRe: Regex Help Pin
User 665815-Dec-06 11:59
User 665815-Dec-06 11:59 
GeneralRe: Regex Help Pin
Expert Coming15-Dec-06 12:03
Expert Coming15-Dec-06 12:03 
QuestionArrayList??????????? Pin
sajid.salim.khan15-Dec-06 10:20
sajid.salim.khan15-Dec-06 10:20 
AnswerRe: ArrayList??????????? Pin
User 665815-Dec-06 10:38
User 665815-Dec-06 10:38 

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.