Click here to Skip to main content
15,913,186 members
Home / Discussions / C#
   

C#

 
QuestionProblem While Writing To A Text File Pin
rowdykuttan7-Oct-07 15:37
rowdykuttan7-Oct-07 15:37 
AnswerRe: Problem While Writing To A Text File Pin
Christian Graus7-Oct-07 15:56
protectorChristian Graus7-Oct-07 15:56 
GeneralRe: Problem While Writing To A Text File Pin
rowdykuttan7-Oct-07 16:06
rowdykuttan7-Oct-07 16:06 
GeneralRe: Problem While Writing To A Text File Pin
Christian Graus7-Oct-07 16:16
protectorChristian Graus7-Oct-07 16:16 
QuestionGet File Executable Header Pin
Patricio Tapia7-Oct-07 11:49
Patricio Tapia7-Oct-07 11:49 
AnswerRe: Get File Executable Header Pin
Anthony Mushrow7-Oct-07 14:36
professionalAnthony Mushrow7-Oct-07 14:36 
QuestionHow to create multiple instances of images. Please help Pin
Matt Cavanagh7-Oct-07 11:45
Matt Cavanagh7-Oct-07 11:45 
AnswerRe: How to create multiple instances of images. Please help Pin
Christian Graus7-Oct-07 12:00
protectorChristian Graus7-Oct-07 12:00 
roguemat wrote:
because else i have to create a picturebox for every possible bullet or enemy there may be


No, you're right, you're very lost. You create NO picture boxes. No game can work that way. Your best bet is to use DirectX, but if you want to try and make it work on just a form, you need to handle the paint event of the form, and draw your bullets, and everything else, directly onto the form.

What generally happens is that you keep an array of alien objects, an array of bullet objects, etc. Your paint event iterates over those arrays and draws the screen. Some other code grabs each bullet and checks if it's intersected with an alien. When you press space to fire, a bullet object is added to that array, with the position and velocity that makes it appear where it should, and move as you want it to.

I wrote a game called collision, it's far from perfect but I went through three articles explaining how I did it, and it sounds like you could learn a lot from that article ( although, again, I would say there's plenty I did wrong, being very new to C# when I wrote it ). It's on this site, just search for it.


Christian Graus - Microsoft MVP - C++

"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

GeneralRe: How to create multiple instances of images. Please help [modified] Pin
Matt Cavanagh7-Oct-07 12:12
Matt Cavanagh7-Oct-07 12:12 
GeneralRe: How to create multiple instances of images. Please help Pin
Anthony Mushrow7-Oct-07 14:33
professionalAnthony Mushrow7-Oct-07 14:33 
GeneralRe: How to create multiple instances of images. Please help Pin
Christian Graus7-Oct-07 14:46
protectorChristian Graus7-Oct-07 14:46 
QuestionVS 2008 Pin
MasterSharp7-Oct-07 11:34
MasterSharp7-Oct-07 11:34 
AnswerRe: VS 2008 Pin
Christian Graus7-Oct-07 11:57
protectorChristian Graus7-Oct-07 11:57 
GeneralRe: VS 2008 Pin
MasterSharp7-Oct-07 12:01
MasterSharp7-Oct-07 12:01 
QuestionCSV to Database Pin
gvanto7-Oct-07 10:29
gvanto7-Oct-07 10:29 
AnswerRe: CSV to Database Pin
Christian Graus7-Oct-07 10:49
protectorChristian Graus7-Oct-07 10:49 
AnswerRe: CSV to Database Pin
gvanto7-Oct-07 12:29
gvanto7-Oct-07 12:29 
QuestionHow would i go about programming an excel like worksheet?? Pin
kranius7-Oct-07 8:09
kranius7-Oct-07 8:09 
AnswerRe: How would i go about programming an excel like worksheet?? Pin
Matthew Cuba7-Oct-07 10:14
Matthew Cuba7-Oct-07 10:14 
AnswerRe: How would i go about programming an excel like worksheet?? Pin
GuyThiebaut7-Oct-07 10:32
professionalGuyThiebaut7-Oct-07 10:32 
AnswerRe: How would i go about programming an excel like worksheet?? Pin
Pete O'Hanlon7-Oct-07 10:50
mvePete O'Hanlon7-Oct-07 10:50 
GeneralRe: How would i go about programming an excel like worksheet?? Pin
kranius7-Oct-07 11:47
kranius7-Oct-07 11:47 
QuestionDifferent Controls Pin
half-life7-Oct-07 7:10
half-life7-Oct-07 7:10 
AnswerRe: Different Controls Pin
Pete O'Hanlon7-Oct-07 10:02
mvePete O'Hanlon7-Oct-07 10:02 
AnswerRe: Different Controls Pin
Matthew Cuba7-Oct-07 10:07
Matthew Cuba7-Oct-07 10: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.