my problem is that when I actually initiate a device or initiate a secondary buffer, VB won't load the program to debug it. I will push play, and it will sit there and after a while it will switch out of debug mode.
I have had this same problem when trying to debug without having all of my GIF images in the directory, so it wouldn't load the form and thus my program wouldn't load.
So any suggestions? All the code I'm using should be the same... and I'm Using express 08, Windows 7, and I don't know what version of DX I'm using.
Also, one other thing. I just created a new project just to see if I could get Dsound working on that, and the first time I ran it, it did the same thing where the mainform didn't show, and then it backed out, but this time it gave me a message:
((Program Compatability Assistant)
Windows detected that this program did not run correctly
to try and fix the problem, Windows has applied compatibility settings to this program. Windows will use these settings the next time you run the program.
Try running the program again.)
It gave me that message for this new project, and my game I've been working on, and it didn't fix the problem for either. Also, I have seen this message before and usually it does fix problems, just not for DX.
Another update, when I added the code that prevents it from running, I tried opening the application from the bin\debug folder, and I got an error message:
System.BadImageFormatException: is not a valid Win32 application. (Exception from HRESULT: 0x800700C1)
at Theta_3._0.Gameform.Gameformload(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Ok, I did that and I was able to get further into the build, (past initiating the device and buffers) however switching the target created a new problem.
Now the first arraylist that is run throws an error (null reference exception)
In the first case that this occurs, I am using a for each loop to go through a bunch of rectangles... but it will happen to any other arraylist if I mark that one out.
This did not happen before I switched the target...