Click here to Skip to main content
15,917,793 members
Home / Discussions / C#
   

C#

 
QuestionWhat am I doing wrong?? Sending serialized objects with Async Sockets.. [Solved] Pin
Jacob D Dixon6-Nov-10 7:53
Jacob D Dixon6-Nov-10 7:53 
AnswerRe: What am I doing wrong?? Sending serialized objects with Async Sockets.. Pin
Jacob D Dixon7-Nov-10 15:25
Jacob D Dixon7-Nov-10 15:25 
GeneralRe: What am I doing wrong?? Sending serialized objects with Async Sockets.. Pin
Peter_in_27807-Nov-10 15:31
professionalPeter_in_27807-Nov-10 15:31 
GeneralRe: What am I doing wrong?? Sending serialized objects with Async Sockets.. Pin
Jacob D Dixon8-Nov-10 17:56
Jacob D Dixon8-Nov-10 17:56 
GeneralRe: What am I doing wrong?? Sending serialized objects with Async Sockets.. Pin
RaviRanjanKr7-Nov-10 16:47
professionalRaviRanjanKr7-Nov-10 16:47 
GeneralRe: What am I doing wrong?? Sending serialized objects with Async Sockets.. Pin
Jacob D Dixon8-Nov-10 17:57
Jacob D Dixon8-Nov-10 17:57 
GeneralRe: What am I doing wrong?? Sending serialized objects with Async Sockets.. Pin
Member 1841422-Mar-11 22:48
Member 1841422-Mar-11 22:48 
QuestionUSer Control Error Pin
SRJ925-Nov-10 17:19
SRJ925-Nov-10 17:19 
hi, ever since i put in a user control, my other buttons don't work why is this ?
The form opens with this user control then once the user clicks "start" it disappears (visible = false) and displays the game behind it, this is the delicate code...

for the Delicate for the useer control
 void usrMenu1_ClickMenu(string Button)
{
    switch (Button)
    {
        case "Start":
            Gameplay = true;
            usrMenu1.Visible= usrSettings1.Visible = false;
            usrMenu1.Hide();
            usrSettings1.Hide();
            break;
         case "Settings":
         usrMenu1.Visible = false;
         usrSettings1.Visible = true;
            break;
    }
 }

This is the button control..
private void FrmGame_KeyDown(object sender, KeyEventArgs e)
       {
           if(Gameplay == true)
           {
               if (e.KeyCode == Keys.Up)
               {
                   if (U == true)
                   {
                       //tim_Player.Enabled = true;
                       Player.Direction = 1;
                       Player.Normal = new Bitmap("images\\playerup.png");
                       U = true;
                       R = true;
                       L = true;
                       D = false;
                   }
               }
               if (e.KeyCode == Keys.Right)
               {
                   if (R == true)
                   {
                       Player.Normal = new Bitmap("images\\playerright.png");
                       //tim_Player.Enabled = true;
                       Player.Direction = 3;
                       L = false;
                       R = true;
                       D = true;
                       U = true;
                   }
               }
               if (e.KeyCode == Keys.Down)
               {
                   if (D == true)
                   {
                       Player.Normal = new Bitmap("images\\playerdown.png");
                       //tim_Player.Enabled = true;
                       Player.Direction = 2;
                       R = true;
                       L = true;
                       U = false;
                       D = true;
                   }
               }
               if (e.KeyCode == Keys.Left)
               {
                   if (L == true)
                   {
                       Player.Normal = new Bitmap("images\\playerleft.png");
                       //tim_Player.Enabled = true;
                       Player.Direction = 4;
                       R = false;
                       L = true;
                       D = true;
                       U = true;
                   }
               }
               if (e.KeyCode == Keys.Up && e.KeyCode == Keys.Right)
               {
                   if (R == true)
                   {
                       Player.Normal = new Bitmap("images\\playerright.png");
                       //tim_Player.Enabled = true;
                       Player.Direction = 3;
                       L = false;
                       R = true;
                       D = true;
                       U = true;
                   }
               }
               if (e.KeyCode == Keys.Down && e.KeyCode == Keys.Right)
               {
                   if (R == true)
                   {
                       Player.Normal = new Bitmap("images\\playerright.png");
                       //tim_Player.Enabled = true;
                       Player.Direction = 3;
                       L = false;
                       R = true;
                       D = true;
                       U = true;
                   }
               }
               if (e.KeyCode == Keys.Up && e.KeyCode == Keys.Left)
               {
                   if (L == true)
                   {
                       Player.Normal = new Bitmap("images\\playerleft.png");
                       //tim_Player.Enabled = true;
                       Player.Direction = 4;
                       R = false;
                       L = true;
                       D = true;
                       U = true;
                   }
               }
               if (e.KeyCode == Keys.Down && e.KeyCode == Keys.Left)
               {
                   if (L == true)
                   {
                       Player.Normal = new Bitmap("images\\playerleft.png");
                       //tim_Player.Enabled = true;
                       Player.Direction = 4;
                       R = false;
                       L = true;
                       D = true;
                       U = true;
                   }
               }
           }
       }


And this is the section of code relivent for you lot to the Setup Game code
        protected void Setup_Game()
        {
            usrMenu1.ClickMenu += new ClickButtonDel(usrMenu1_ClickMenu);
}

AnswerRe: USer Control Error Pin
OriginalGriff5-Nov-10 22:54
mveOriginalGriff5-Nov-10 22:54 
AnswerRe: USer Control Error Pin
_Erik_5-Nov-10 23:15
_Erik_5-Nov-10 23:15 
QuestionSocket error on service stop Pin
Jacob D Dixon5-Nov-10 14:40
Jacob D Dixon5-Nov-10 14:40 
AnswerRe: Socket error on service stop Pin
RaviRanjanKr5-Nov-10 19:08
professionalRaviRanjanKr5-Nov-10 19:08 
GeneralRe: Socket error on service stop [modified] Pin
Jacob D Dixon6-Nov-10 5:32
Jacob D Dixon6-Nov-10 5:32 
QuestionUnit testing Pin
Tichaona J5-Nov-10 7:51
Tichaona J5-Nov-10 7:51 
AnswerRe: Unit testing Pin
fjdiewornncalwe5-Nov-10 8:12
professionalfjdiewornncalwe5-Nov-10 8:12 
AnswerRe: Unit testing Pin
Dave Kreskowiak5-Nov-10 9:43
mveDave Kreskowiak5-Nov-10 9:43 
GeneralRe: Unit testing Pin
Tichaona J5-Nov-10 12:00
Tichaona J5-Nov-10 12:00 
GeneralRe: Unit testing Pin
Pete O'Hanlon5-Nov-10 12:07
mvePete O'Hanlon5-Nov-10 12:07 
GeneralRe: Unit testing Pin
Dave Kreskowiak5-Nov-10 14:08
mveDave Kreskowiak5-Nov-10 14:08 
AnswerRe: Unit testing Pin
David Ewen8-Nov-10 14:07
professionalDavid Ewen8-Nov-10 14:07 
QuestionBadly behaving COM object. Pin
jbradshaw5-Nov-10 3:12
jbradshaw5-Nov-10 3:12 
AnswerRe: Badly behaving COM object. Pin
OriginalGriff5-Nov-10 3:33
mveOriginalGriff5-Nov-10 3:33 
AnswerRe: Badly behaving COM object. Pin
Abhinav S5-Nov-10 3:36
Abhinav S5-Nov-10 3:36 
AnswerRe: Badly behaving COM object. Pin
_Erik_5-Nov-10 3:38
_Erik_5-Nov-10 3:38 
AnswerRe: Badly behaving COM object. Pin
Pete O'Hanlon5-Nov-10 3:43
mvePete O'Hanlon5-Nov-10 3:43 

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.