Click here to Skip to main content
15,920,633 members
Home / Discussions / C#
   

C#

 
AnswerRe: dll error Pin
Arun Jacob13-Jul-10 2:01
Arun Jacob13-Jul-10 2:01 
GeneralRe: dll error Pin
Enobong Adahada13-Jul-10 3:50
Enobong Adahada13-Jul-10 3:50 
QuestionDll which complied in vista takes too much time Pin
rsumanan13-Jul-10 1:09
rsumanan13-Jul-10 1:09 
AnswerRe: Dll which complied in vista takes too much time Pin
Not Active13-Jul-10 1:21
mentorNot Active13-Jul-10 1:21 
GeneralRe: Dll which complied in vista takes too much time Pin
rsumanan13-Jul-10 19:29
rsumanan13-Jul-10 19:29 
GeneralRe: Dll which complied in vista takes too much time Pin
Not Active14-Jul-10 1:05
mentorNot Active14-Jul-10 1:05 
GeneralRe: Dll which complied in vista takes too much time Pin
rsumanan14-Jul-10 17:19
rsumanan14-Jul-10 17:19 
QuestionThe classic bouncing ball logic!! Pin
Muammar©12-Jul-10 23:08
Muammar©12-Jul-10 23:08 
Hey everyone, I'm sorry I'm asking this kind of question but I completely lost my logic today and need your help on this..

You see, it's a simple bouncing ball application, how can I make the ball bounce randomly and freely in the screen and still look natural.. Many thanks guys, here's what I'm doing now:

    if ((y + h) >= ScreenH)//hit bottom
        CurrentDirection = BallDirection.Right;

    if ((x + w) >= ScreenW)//hit right
        CurrentDirection = BallDirection.Top;

    if ((x) <= 0)//hit left
        CurrentDirection = BallDirection.Bottom;

    if ((y) <= 0)//hit top
        CurrentDirection = BallDirection.Left;



    switch(CurrentDirection)
    {
        case BallDirection.Bottom:
        x += step;
        y += step;
        break;

        case BallDirection.Top:
        x -= step;
        y -= step+7;
        break;

        case BallDirection.Left:
        x -= step;
        y += step;
        break;

        case BallDirection.Right:
        x += step;
        y -= step;
        break;
}


    pb.Left = x;
    pb.Top = y;
    Invalidate();
}

AnswerRe: The classic bouncing ball logic!! Pin
Eddy Vluggen12-Jul-10 23:13
professionalEddy Vluggen12-Jul-10 23:13 
GeneralRe: The classic bouncing ball logic!! Pin
Muammar©12-Jul-10 23:36
Muammar©12-Jul-10 23:36 
AnswerRe: The classic bouncing ball logic!! Pin
Peace ON12-Jul-10 23:51
Peace ON12-Jul-10 23:51 
GeneralRe: The classic bouncing ball logic!! Pin
Eddy Vluggen13-Jul-10 0:24
professionalEddy Vluggen13-Jul-10 0:24 
GeneralRe: The classic bouncing ball logic!! Pin
Muammar©13-Jul-10 0:42
Muammar©13-Jul-10 0:42 
GeneralRe: The classic bouncing ball logic!! Pin
Eddy Vluggen13-Jul-10 1:20
professionalEddy Vluggen13-Jul-10 1:20 
AnswerRe: The classic bouncing ball logic!! Pin
harold aptroot13-Jul-10 0:10
harold aptroot13-Jul-10 0:10 
AnswerRe: The classic bouncing ball logic!! [modified] Pin
Luc Pattyn13-Jul-10 1:04
sitebuilderLuc Pattyn13-Jul-10 1:04 
GeneralRe: The classic bouncing ball logic!! Pin
David Skelly13-Jul-10 2:06
David Skelly13-Jul-10 2:06 
GeneralRe: The classic bouncing ball logic!! Pin
Luc Pattyn13-Jul-10 2:18
sitebuilderLuc Pattyn13-Jul-10 2:18 
GeneralRe: The classic bouncing ball logic!! Pin
David Skelly13-Jul-10 6:51
David Skelly13-Jul-10 6:51 
GeneralRe: The classic bouncing ball logic!! Pin
Pete O'Hanlon13-Jul-10 8:59
mvePete O'Hanlon13-Jul-10 8:59 
Question.exe update Pin
padmanabhan N12-Jul-10 21:59
padmanabhan N12-Jul-10 21:59 
AnswerRe: .exe update Pin
Peace ON12-Jul-10 22:19
Peace ON12-Jul-10 22:19 
QuestionWrite application version and installation path to registry Pin
sumit703412-Jul-10 21:11
sumit703412-Jul-10 21:11 
AnswerRe: Write application version and installation path to registry Pin
Peace ON12-Jul-10 21:46
Peace ON12-Jul-10 21:46 
GeneralRe: Write application version and installation path to registry Pin
sumit703412-Jul-10 22:32
sumit703412-Jul-10 22:32 

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.