Hello,
I have 2 questions.
1) I'm using micrsoft visual studio 2010 express for windows phone. Is it right I can't add 2 forms to my game? I have a frmMain and I want to add a frmMainMenu. But I can't call for frmMainMenu in my frmMain with:
2) On my frmMain I want to use 2 spritenbatche's. But by one of the pictureboxes where one of the spritebatches is set to, will just color black instead of the normal image I want to give the picturebox. I've used the same subs but just with a '2' after the GDevice/Ourcontent/Sbatch. Is this normal?
Code:
Public GDevice As GraphicsDevice
Public OurContent As clsContent.GameContent
Public SBatch As SpriteBatch
Public GDevice2 As GraphicsDevice
Public OurContent2 As clsContent2.GameContent
Public SBatch2 As SpriteBatch
Code:
Public Function InitalizeGraphics(ByRef Surface As PictureBox) As Boolean
Dim retValue As Boolean
Try
Dim PParam As New PresentationParameters
PParam.PresentationInterval = PresentInterval.Immediate
PParam.DeviceWindowHandle = Surface.Handle
PParam.IsFullScreen = False
Dim GAdapter As GraphicsAdapter = GraphicsAdapter.Adapters.Item(0)
GDevice = New GraphicsDevice(GAdapter, GraphicsProfile.HiDef, PParam)
OurContent = New clsContent.GameContent(GDevice)
OurContent.Content.RootDirectory = "Content"
SBatch = New SpriteBatch(GDevice)
LoadGraphics()
retValue = True
Catch ex As Exception
retValue = False
End Try
Return retValue
End Function
and this code again with a 2 behind the Sbatch, OurContent, GDevice etc.
Thanks in advanced