Click here to Skip to main content
15,892,674 members
Home / Discussions / C#
   

C#

 
GeneralRe: Winform graph Pin
Eddy Vluggen24-Mar-12 2:25
professionalEddy Vluggen24-Mar-12 2:25 
AnswerRe: Winform graph Pin
Philippe Mori23-Mar-12 12:28
Philippe Mori23-Mar-12 12:28 
GeneralRe: Winform graph Pin
DerecL23-Mar-12 13:16
DerecL23-Mar-12 13:16 
AnswerRe: Winform graph Pin
eupendra25-Mar-12 22:11
eupendra25-Mar-12 22:11 
Question<b>Question: Making a Keno Game in C#</b> Pin
Tailean23-Mar-12 10:39
Tailean23-Mar-12 10:39 
QuestionRe: Question: Making a Keno Game in C# Pin
Eddy Vluggen23-Mar-12 11:20
professionalEddy Vluggen23-Mar-12 11:20 
QuestionRe: Question: Making a Keno Game in C# Pin
Tailean23-Mar-12 11:34
Tailean23-Mar-12 11:34 
AnswerRe: Question: Making a Keno Game in C# Pin
Eddy Vluggen23-Mar-12 14:14
professionalEddy Vluggen23-Mar-12 14:14 
Change the code to this, click five times;
C#
{
            tokenChecking();
            resetColors();

            // the line below should be in the constructor
            timer1.Tick += new EventHandler(timer2_Tick); 
            timer1.Enabled = true;
            MessageBox.Show("Test");

            // The Radom function always returns 
            Random rnd = new Random(Environment.TickCount);
            Byte[] randArray = new Byte[20];
            
            // Fils the array with random bytes
            rnd.NextBytes(randArray);
            
            tokenTextBox.Text = "" + tokenTracker;
            textBox1.Clear();
 
            // 20 times
            for (int i = 0; i <= randArray.Length; i++)
            {
                // fetch a number between 1 and 80
                n = rnd.Next(1, 80);
 
                // meaning that this can't happen.                
                if (n < 0)
                {
                    throw new Exception(
                       "http://msdn.microsoft.com/en-us/library/2dx6wyd4.aspx");
                }
                // this ain't happening either;
                if (n == 0) throw new Exception();
  
                // Generate a random color
                Color someRandomColor = Color.FromArgb(
                    rnd.Next(0,255), 
                    rnd.Next(0,255), 
                    rnd.Next(0,255));

                // pick a random button (between 1 and 80) and give it the
                // random color we created. 
                //  Controls is a property of this form, and it's a collection
                //  that contains references to all controls on the form.
                // Use MyCoolPanel.Controls["button" + n.ToString()].BackColor =
                //  if the buttons are located on a cool panel with the name
                //  MyCoolPanel. 
                Controls["button" + n.ToString()].BackColor = someRandomColor;

                // remove all those if's down there..

..to what value has your timer been set? 1000 milliseconds interval?
Bastard Programmer from Hell Suspicious | :suss:

GeneralRe: Question: Making a Keno Game in C# Pin
Tailean23-Mar-12 15:12
Tailean23-Mar-12 15:12 
GeneralRe: Question: Making a Keno Game in C# Pin
Eddy Vluggen24-Mar-12 1:26
professionalEddy Vluggen24-Mar-12 1:26 
QuestionUse of multiple panel Control in winform Pin
Dexter Arora23-Mar-12 10:31
Dexter Arora23-Mar-12 10:31 
AnswerRe: Use of multiple panel Control in winform Pin
Eddy Vluggen23-Mar-12 11:17
professionalEddy Vluggen23-Mar-12 11:17 
GeneralRe: Use of multiple panel Control in winform Pin
Dexter Arora24-Mar-12 0:48
Dexter Arora24-Mar-12 0:48 
GeneralRe: Use of multiple panel Control in winform Pin
Eddy Vluggen24-Mar-12 1:20
professionalEddy Vluggen24-Mar-12 1:20 
GeneralRe: Use of multiple panel Control in winform Pin
Dexter Arora24-Mar-12 2:08
Dexter Arora24-Mar-12 2:08 
QuestionRe: Use of multiple panel Control in winform Pin
Eddy Vluggen24-Mar-12 2:17
professionalEddy Vluggen24-Mar-12 2:17 
AnswerRe: Use of multiple panel Control in winform Pin
Dexter Arora24-Mar-12 9:17
Dexter Arora24-Mar-12 9:17 
GeneralRe: Use of multiple panel Control in winform Pin
eupendra25-Mar-12 22:13
eupendra25-Mar-12 22:13 
GeneralRe: Use of multiple panel Control in winform Pin
Dexter Arora26-Mar-12 7:46
Dexter Arora26-Mar-12 7:46 
QuestionCan read 64bit Reg_Sz, but not 64bit D_Word Pin
turbosupramk323-Mar-12 8:48
turbosupramk323-Mar-12 8:48 
QuestionRe: Can read 64bit Reg_Sz, but not 64bit D_Word Pin
Eddy Vluggen23-Mar-12 11:07
professionalEddy Vluggen23-Mar-12 11:07 
AnswerRe: Can read 64bit Reg_Sz, but not 64bit D_Word Pin
turbosupramk323-Mar-12 11:43
turbosupramk323-Mar-12 11:43 
AnswerRe: Can read 64bit Reg_Sz, but not 64bit D_Word Pin
Eddy Vluggen23-Mar-12 11:52
professionalEddy Vluggen23-Mar-12 11:52 
GeneralRe: Can read 64bit Reg_Sz, but not 64bit D_Word Pin
turbosupramk323-Mar-12 12:38
turbosupramk323-Mar-12 12:38 
GeneralRe: Can read 64bit Reg_Sz, but not 64bit D_Word Pin
Eddy Vluggen23-Mar-12 13:45
professionalEddy Vluggen23-Mar-12 13:45 

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.