VB .Net screwing up

Started by
2 comments, last by runnerbuddy2k8 18 years, 7 months ago
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.
Advertisement
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.
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.
Sean Henley [C++ Tutor]Rensselaer Polytechnic Institute
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.

This topic is closed to new replies.

Advertisement