Click here to Skip to main content
15,890,690 members
Home / Discussions / C#
   

C#

 
GeneralRe: Paint.NET Pin
lmoelleb14-Oct-07 7:20
lmoelleb14-Oct-07 7:20 
GeneralRe: Paint.NET Pin
MasterSharp14-Oct-07 7:22
MasterSharp14-Oct-07 7:22 
GeneralRe: Paint.NET Pin
lmoelleb14-Oct-07 7:32
lmoelleb14-Oct-07 7:32 
AnswerRe: Paint.NET Pin
Pete O'Hanlon14-Oct-07 10:13
mvePete O'Hanlon14-Oct-07 10:13 
GeneralRe: Paint.NET Pin
MasterSharp14-Oct-07 10:15
MasterSharp14-Oct-07 10:15 
GeneralRe: Paint.NET Pin
Pete O'Hanlon14-Oct-07 10:21
mvePete O'Hanlon14-Oct-07 10:21 
AnswerRe: Paint.NET Pin
Christian Graus14-Oct-07 11:41
protectorChristian Graus14-Oct-07 11:41 
QuestionWindows collision Pin
MasterSharp14-Oct-07 5:53
MasterSharp14-Oct-07 5:53 
DOes anyone know a way of checking collision between a picturebox? I found a way, but I deleted it because it worked only sometime, and other let the object pass right through. I used (Something like this...)

private void CheckCollision()<br />
{<br />
    int x = picturebox1.Location.X;<br />
    int y = picturebox1.Location.Y;<br />
    int ex = picturebox2.Location.X;<br />
    int ey = picturebox.Location.Y;<br />
  <br />
// assuming both boxes are 20 units l/w<br />
<br />
    if ((x + 20) == ex<br />
&& //things that tell if you are below / above box...<br />
|| // ditto<br />
    this.Close();<br />
<br />
// there were more things to the if and it worked, but after 1 collision it stopped working<br />
}


So, my real question (I was just showing you basically the idea I had), is if there's a simpler way to do this. Thanks in advance.

The most knowledge doesn't mean the most wise...

AnswerRe: Windows collision Pin
Kristian Sixhøj14-Oct-07 6:46
Kristian Sixhøj14-Oct-07 6:46 
GeneralRe: Windows collision Pin
MasterSharp14-Oct-07 6:55
MasterSharp14-Oct-07 6:55 
GeneralRe: Windows collision Pin
Kristian Sixhøj14-Oct-07 7:16
Kristian Sixhøj14-Oct-07 7:16 
GeneralRe: Windows collision Pin
MasterSharp14-Oct-07 7:19
MasterSharp14-Oct-07 7:19 
GeneralRe: Windows collision Pin
Kristian Sixhøj14-Oct-07 7:21
Kristian Sixhøj14-Oct-07 7:21 
GeneralRe: Windows collision Pin
MasterSharp14-Oct-07 7:23
MasterSharp14-Oct-07 7:23 
GeneralRe: Windows collision Pin
Kristian Sixhøj14-Oct-07 7:27
Kristian Sixhøj14-Oct-07 7:27 
GeneralRe: Windows collision Pin
MasterSharp14-Oct-07 7:30
MasterSharp14-Oct-07 7:30 
Generalcarrer gudiance Pin
sid_si14-Oct-07 4:56
sid_si14-Oct-07 4:56 
GeneralRe: carrer gudiance Pin
J4amieC14-Oct-07 5:15
J4amieC14-Oct-07 5:15 
GeneralRe: carrer gudiance Pin
sid_si14-Oct-07 5:25
sid_si14-Oct-07 5:25 
Questionhow to write? Pin
s4_sabahatf14-Oct-07 4:24
s4_sabahatf14-Oct-07 4:24 
AnswerRe: how to write? Pin
Roger CS14-Oct-07 6:14
Roger CS14-Oct-07 6:14 
QuestionOleDB Pin
s4_sabahatf14-Oct-07 4:10
s4_sabahatf14-Oct-07 4:10 
AnswerRe: OleDB Pin
Hesham Amin14-Oct-07 4:31
Hesham Amin14-Oct-07 4:31 
QuestionMethod timeout Pin
martin_hughes14-Oct-07 3:40
martin_hughes14-Oct-07 3:40 
AnswerRe: Method timeout Pin
TJoe15-Oct-07 4:07
TJoe15-Oct-07 4:07 

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.