Click here to Skip to main content
15,902,635 members
Home / Discussions / C#
   

C#

 
JokeRe: globalizatin Pin
Arun Jacob27-Aug-09 1:06
Arun Jacob27-Aug-09 1:06 
AnswerRe: globalizatin Pin
Arun Jacob27-Aug-09 1:04
Arun Jacob27-Aug-09 1:04 
AnswerRe: globalizatin Pin
Trapper-Hell27-Aug-09 1:14
Trapper-Hell27-Aug-09 1:14 
AnswerRe: globalizatin Pin
Rajesh R Subramanian27-Aug-09 4:44
professionalRajesh R Subramanian27-Aug-09 4:44 
AnswerRe: globalizatin Pin
Luc Pattyn27-Aug-09 7:42
sitebuilderLuc Pattyn27-Aug-09 7:42 
QuestionChange color of ten or more PictureBoxes Pin
Lyon Sun27-Aug-09 0:48
Lyon Sun27-Aug-09 0:48 
AnswerRe: Change color of ten or more PictureBoxes Pin
Henry Minute27-Aug-09 1:05
Henry Minute27-Aug-09 1:05 
AnswerRe: Change color of ten or more PictureBoxes Pin
Lyon Sun27-Aug-09 1:50
Lyon Sun27-Aug-09 1:50 
Hi,
Here is part of the code for that user control which I am working on. Truely there are some bugs here, but never mind. What I need to know is how I can code in that ColorChanged() method so that I can change the color of those PictureBoxes in between. Thank you and BR!
public DateTime getTimeAt(int x, int y)
{
    DateTime selectedTime = new DateTime();
    Random rnd=new Random();

    int hour = (y - 10) / 20 + 8;
    int minute = Convert.ToInt32((x - 25) / 50) * 10 + rnd.Next(1,9);

    if (minute>59)
    {
        minute = 59;
    }

    selectedTime = DateTime.Today;
    selectedTime = selectedTime.AddHours(hour);
    selectedTime = selectedTime.AddMinutes(minute);

    return selectedTime;
}

private void OnMouseDown(object sender, MouseEventArgs e)
{
       StartTime = getTimeAt(e.X, e.Y);
       Updating();
}

private void OnMouseUp(object sender, MouseEventArgs e)
{
    EndTime = getTimeAt(e.X, e.Y);
    Updating();
}

public void ColorChanged(int x, int y)
{
    ////What I need is how to code here...
}

public void Updating()
{
    maskedTextBox1.Text = StartTime.ToString("hhmm");
    maskedTextBox2.Text = EndTime.ToString("hhmm");
}


---------------------------
I won't never ever give up!!
GeneralRe: Change color of ten or more PictureBoxes Pin
Henry Minute27-Aug-09 2:14
Henry Minute27-Aug-09 2:14 
GeneralRe: Change color of ten or more PictureBoxes Pin
Lyon Sun27-Aug-09 2:38
Lyon Sun27-Aug-09 2:38 
GeneralRe: Change color of ten or more PictureBoxes Pin
Henry Minute27-Aug-09 3:00
Henry Minute27-Aug-09 3:00 
GeneralRe: Change color of ten or more PictureBoxes Pin
Lyon Sun27-Aug-09 3:53
Lyon Sun27-Aug-09 3:53 
QuestionRe: Change color of ten or more PictureBoxes Pin
Lyon Sun27-Aug-09 20:34
Lyon Sun27-Aug-09 20:34 
AnswerRe: Change color of ten or more PictureBoxes Pin
Henry Minute28-Aug-09 2:45
Henry Minute28-Aug-09 2:45 
AnswerRe: Change color of ten or more PictureBoxes Pin
Lyon Sun28-Aug-09 9:27
Lyon Sun28-Aug-09 9:27 
Questiongrid view Pin
ankitjain111026-Aug-09 23:47
ankitjain111026-Aug-09 23:47 
AnswerRe: grid view Pin
Vimalsoft(Pty) Ltd26-Aug-09 23:57
professionalVimalsoft(Pty) Ltd26-Aug-09 23:57 
GeneralRe: grid view Pin
ankitjain111027-Aug-09 0:10
ankitjain111027-Aug-09 0:10 
GeneralRe: grid view Pin
Vimalsoft(Pty) Ltd27-Aug-09 0:13
professionalVimalsoft(Pty) Ltd27-Aug-09 0:13 
QuestionAdding values to datatable Pin
myinstincts26-Aug-09 23:14
myinstincts26-Aug-09 23:14 
AnswerRe: Adding values to datatable Pin
Vimalsoft(Pty) Ltd26-Aug-09 23:25
professionalVimalsoft(Pty) Ltd26-Aug-09 23:25 
AnswerRe: Adding values to datatable Pin
kKamel26-Aug-09 23:26
kKamel26-Aug-09 23:26 
GeneralRe: Adding values to datatable [modified] Pin
myinstincts26-Aug-09 23:39
myinstincts26-Aug-09 23:39 
GeneralRe: Adding values to datatable Pin
kKamel27-Aug-09 0:40
kKamel27-Aug-09 0:40 
QuestionHardware Acceleration on a PictureBox / Non-Apparent Image in Screenshot Pin
Trapper-Hell26-Aug-09 23:09
Trapper-Hell26-Aug-09 23:09 

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.