Jump to content
  • Advertisement
Sign in to follow this  
runnerbuddy2k8

VB .Net screwing up

This topic is 4826 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Well I had a simple startup process for the game I'm making display a picture to the form on startup. After a few days I made a new picture to replace the old one, and deleted the old picture completely. Whenever I run the program with the new image, it always displays the old one. It makes absolutely no sense to me. It might be an error with .net 2005 though. If you need to see my code just say so.

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Check if your program is loading/saving to the correct file path. I think that would either do it, or we'll have to take it a step further. Let us know.

Share this post


Link to post
Share on other sites
I assume you are using a resource, rathing than actually loading the file every time the program runs. Try to delete the resource and recreate it.

Share this post


Link to post
Share on other sites
What you both just said is irrelevant now, as I just copied and pasted code into a new project. Now it somehow stretched the bitmap without me coding it, and I'm even more confused than before. I'll just stop coding for now and work on the story some more. Hopefully I can get the engine up and running before I finish the story. I'll put the code up so you can look at it(not much to look at though).

Public Class Form1

Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
ScrData.CurScreen = "Start Screen"
End Sub

Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
Select Case ScrData.CurScreen
Case "Start Screen"
e.Graphics.DrawImage(My.Resources.Start_Screen, 0, 0)
End Select
End Sub
End Class

Module DataTypes
Public Structure ScreenData
Dim CurScreen As String
End Structure
Public scrdata As ScreenData
End Module

The image is 800x600, as is the form. The picture looks like it was stretched to 200% or thereabouts.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!