• 11
• 9
• 10
• 9
• 11

problem change screen xna

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

Recommended Posts

give a message of server is offline

i put my interecode in github

this is the link to my code https://github.com/Kammikazy/Firstgame

Edited by Landi20

Share on other sites

topic can be close problem as be solve

how?

Share on other sites

only add this code to my source code

        System.Windows.Forms.Control.CheckForIllegalCrossThreadCalls = false;


Share on other sites

Sounds more like a hack to make it work, since the setting name suggests cross-thread calls are actually illegal. If you have time you should check your code to make sure you're not accessing the GUI from multiple threads, before your code becomes too big to fix - this kind of concurrency issue is sure to come bite you again later on (this warning is actually there to alert you of it, since they can be hard to detect and track down).

Share on other sites

thanks for advice but this is a tempory fix

what you sujest to fix my problem

how i fix the problem not using this code System.Windows.Forms.Control.CheckForIllegalCrossThreadCalls = false;

this is my issos when i dont use System.Windows.Forms.Control.CheckForIllegalCrossThreadCalls = false;

A first chance exception of type 'System.InvalidOperationException' occurred in System.Windows.Forms.dll
'TomShane.Neoforce.Central.exe' (CLR v4.0.30319: TomShane.Neoforce.Central.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\mscorlib.resources\v4.0_4.0.0.0_pt_b77a5c561934e089\mscorlib.resources.dll'. Module was built without symbols.
em System.Windows.Forms.Control.get_Handle()
em System.Windows.Forms.Control.set_Cursor(Cursor value)
em TomShane.Neoforce.Controls.Manager.SetCursor(Cursor cursor)
em TomShane.Neoforce.Controls.Manager.SetSkin(Skin skin)
em TomShane.Neoforce.Controls.Manager.SetSkin(String name)
em TomShane.Neoforce.Controls.Manager.Initialize()
em TomShane.Neoforce.Central.Code.server.Initialize() em c:\Users\Pedro\Dropbox\GAMES\TomShane.Neoforce.Controls.XNA4\Neoforce\Source\Central\Code\server.cs:line 283
em Microsoft.Xna.Framework.GameComponentCollection.InsertItem(Int32 index, IGameComponent item)
em XRpgLibrary.GameStateManager.AddState(GameState newState) em c:\Users\Pedro\Dropbox\GAMES\TomShane.Neoforce.Controls.XNA4\Neoforce\Source\XRpgLibrary\GameStateManager.cs:line 81
em XRpgLibrary.GameStateManager.PushState(GameState newState) em c:\Users\Pedro\Dropbox\GAMES\TomShane.Neoforce.Controls.XNA4\Neoforce\Source\XRpgLibrary\GameStateManager.cs:line 74

`
Edited by Landi20