16,003,920 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Brian_TheLion (Top 4 by date)
Brian_TheLion
22-Nov-19 0:25am
View
I found what the problem was. The Form1_Load was not being executed. So any code under Form1_Load was not being actioned which means many things did not get loaded at the start of the game.
I've added 'this.load += Form1_Load' under public Form1()
I think the main problem is that with the latest version of Visual Studio some of the defaults like Form1_load has been turned off as in the past the code Form1_load was automatically excited when the program was compiled.
Brian_TheLion
21-Nov-19 17:52pm
View
I am wondering if I should have a picturebox on the form for the stars to be displayed as this was not in the tutorial.
Brian_TheLion
21-Nov-19 17:34pm
View
Thanks for your help.
I tried the if (stars !=null) {..} but it blocks code from happening which results in no stars being shown.
It's strange that it works for the tutor...maybe something to do with different Visual Studio versions as he's using #7. I think I still have #7 of visual studio so I might try it using this version.
Brian_TheLion
20-Nov-19 19:29pm
View
Thanks for your help.
I tried putting 'starts = new PictureBox[10];' under the InitializeComponet(); code
but are now getting a similar error on this line
starts[i].Top += backgroundspeed;
however setting the MoveBhTimer to null solved this problem.
The compiler tells me that stars are null.
I had similar errors for the Munitions part of the code and made the same corrections but now when runing the program nothing happens. I should see stars moving in the sky and be able to move me spacecraft on the screen.
Any more help would be welcomed thanks.