DuncanP's Q&A profile
Game Technologies: DirectX, XNA, XACT, etc. Form file not found ?
I'm writing a game with MDX 1.1 and VS's 2003 and 2005 On my computer i have 2 OSes I've started developing on Vista RTM with VS 2005 Game worked normally on my computer But when I uploaded it to a forum its members reported that it gives a system.iofilenotfound exception (don't yhink about missing data files, they're all at the right place and paths are not ablosute) Then i have switched to XP and ran EXE compiled on Vista with debug. This exception happens when dim frm as new GameForm or frm=new GameForm in sub Main() Frameworks 1.1 and 2.0 and DX are installed on my and members' computers. I have trie all combinations of VS 2003/2005 and Vista/XP I have no idea Help me, please Often people will tell yo ...Show All
Game Technologies: DirectX, XNA, XACT, etc. How do I animate a .dds?
Hi, I did a quick search but can't seem to find anything on how to create an animated .dds file. I have an animated .gif but I get some random error code when I try to compile and it fails. If I'm going about this all wrong and you can't even animate .dds files code somebody point me in the right direction about how to get animations in games. Thanks. If you packed the seperate images into the dds file like a volume texture, then you could animate the texture by changing the w texture coordinate over a set period of time [As in (u,v,w)]. Otherwise you could do as AndyL suggests, and pack them into one large texture. In this case, you would use the u,v coordinates to clip the portion of the textur ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Issues with a Loading Bar
Well, earlier today I realized my mario-clone was taking a while to load mainly due to the audio files and partly due to the many sprites being loaded. It wasn't a real problem, but it seemed rather unproffesional to have the computer pause for a while without any feedback for the user to confirm that anything was happening. Initially I used System.Console.WriteLine("Loading Something...") for the various resources that I had. This works fine for debugging, but whenever I tried to organize a loading bar that the user could see on a devoted portion of my game I experienced some trouble. First off, I'm using game states to determine whether I'm loading, at the menu, or playing the game, these aren't a problem. Secondly I'm using a ...Show All
Visual C++ va_list and string table
Hi, I have a string table in my resource file and in my application I want to load these strings with function below 'load_string'. Strings within table contain %s,%d,%c, etc placeholders therefore I am using 'vwprintf' to resolve them. However the debugger on vwprintf fails and I can't figure out why Can you please help void load_string(UINT nResource, ...) { va_list args; TCHAR * lpszString = new TCHAR[1024]; LoadString(GetModuleHandle(NULL),nResource, lpszString, 1024); va_start(args, lpszString); vwprintf(lpszString, args); va_end(args); } int _tmain( int argc, _TCHAR* argv[]) { load_string( IDS_TEST, _T( "blah" ),101); return 0; } IDS_TEST => "Hello, %s you are %d years old!" I thi ...Show All
.NET Development Remoting Client Exception !!! "The remoting application name "XYZ" has already been set."
Hi, I am getting an exception when I am trying to configure the Remoting Client using the xml configuration file. Code: System.Runtime.Remoting. RemotingConfiguration .Configure( @"C:\Server.config" , false ); Exception: Remoting configuration failed with the exception 'System.Runtime.Remoting.RemotingException: The remoting application name, 'RemotingServer', had already been set.\r\n at System.Runtime.Remoting.RemotingConfigHandler.set_ApplicationName(String value)\r\n at System.Runtime.Remoting.RemotingConfigHandler.ConfigureRemoting(RemotingXmlConfigFileData configData, Boolean ensureSecurity)'."} System.SystemException {System.Runtime.Remoting.RemotingException} This application runs fine on ano ...Show All
SQL Server How to use comma separated value list in the where clause?
How to use comma separated value list in the where clause I would like to do something like the following (Set voted = true for all rows in tblVoters where EmpID is in the comma separated value list). update tbl_Voters set voted = true where EmpID in @empIdsCsv Where, @empIdsCsv = ’12,23,345,’ (IDs of the employees) Since the above is not possible I have done the following dynamic query: -- Convert the comma separated values to conditional statement like EmpID = {id} or EmpliD = {id}… set @empIdsCsv = 'EmpID=' + substring ( @empIdsCsv , 0 , len ( @empIdsCsv )) -- Remove trailing comma set @empIdsCsv = replace ( @empIdsCsv , ',' , ' or EmpID= ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Cannot connect to the auditioning server?
When I first tried to use XACT a few weeks ago it worked like charm. Then for no apparent reason I cannot make the GUI to connect to the XACT auditioning tool And now I can't play the sound files I create. I get a time out error message. Any ideas what's wrong ...Show All
SQL Server Flat File and uneven number of columns
Please leave feedback for Microsoft regarding this problem at https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx FeedbackID=126493 Ok I'm sure it just me, SSIS has been great so far....but how can you import a straight CSV file with and uneven column count. For example: (assume CR LF row delimiter) The,Quick,Brown,Fox,Jumps Hello,World This,is,a,test "Normally" I'd expect this | Col1 | | Col2 | | Col3 | | Col4 | | Col5 | The Quick Brown Fox Jumps Hello World NULL NULL NULL This is a test NULL Ok but what we get is the row delimiter is ignored in preference for the column delimiter and the row delimiter gets sucked in ...Show All
Visual Basic MySQL
Using MySQL to store my information on my server and I am writing a program to read/write to it. I am using an example on the web click here to setup my Login screen. Im having problems with the Imports MySql.Data.MySqlClient . I have gone to MySQL.com and downloaded the connector but I can't seem to get things working right. What am I doing wrong I just used the drivers from the MySQL site and everything attaches fine for me. I used the ADO.net driver and the Visual Studio Plugin. ...Show All
Visual C# ToShortDateString format
Console.WriteLine(DateTime.Now.ToShortDateString()); This line prints: 03/01/02007 Why In Regional and Language Options dialog on my computer I see: Short date: 03/01/2007 In the Regional and Language Options dialog, what is the current format set to (e.g. "English (United States)", "French (France)", etc.) Have you customized the short date format string at all -Tom Meschter Software Dev, Visual C# IDE ...Show All
Windows Forms C# Respond to Windows Shutdown
I have a C# app that primeraly displays an icon in the system tray. The main form doesn't close but only get hidden when the close button is pressed. To shut down the app the user must right click the system tray icon and select exit from the popup menu. Everything works fine except when I got to shutdown windows and this app is running it doesn't respond to the system shutdown and remains running forcing windows to stay running. How can I have the app responde to the system shutdown message and close so windows can shut down properly I figured it out. I added the below code to my form and it solved the problem. Now when I click the close button the form hides when when ...Show All
Software Development for Windows Vista Can't install MicrosoftR Visual StudioR 2005 Extensions for WindowsR Workflow Foundation Release Candidate 2
Hi, I downloaded MicrosoftR Visual StudioR 2005 Extensions for WindowsR Workflow Foundation Release Candidate 2 from Microsoft website ( http://www.microsoft.com/downloads/thankyou.aspx familyId=63A80A4B-BD27-4124-A2A5-61786ADB626E&displayLang=en&oRef=http%3a%2f%2fwf.netfx3.com%2fblogs%2fnews_and_announcements%2farchive%2f2006%2f06%2f23%2fJune-CTP-Available_2C00_-RC-Build-of-WF.aspx ) but when I open it, it starts Active Sync 4.1 installation! What's wrong with that Thanks If you have a setup.exe file in the same directory as the wf exe file, then the installer gets a little confused and starts that setup.exe. So after unzipping, it found the setup.exe for activesync and started t ...Show All
Visual Studio Team System File Attachment Best Practice
Hi All, What are the best practices for attaching files to Work Items. I.e. do I add the files into the Sharepoint Portal and then attach the files from sharepoint to the work Item. The reason I ask is because when I do that it seems to create a new file, adds a [1] to the end of the file. Also if I just add an attachment from the browse button in the work item, is there anyway to get to the file again without going through the work item I.e. by browsing the documents on sharepoint Thanks Craig Thanks jeff, Shame about that really, I have lots of different requirements documents and it would be good to group them all up in sharepoint so all team members have access, and then to ...Show All
SQL Server SQL Express Cannot Start
Hi there, I recently installed VS Express on a brand-new machine running Win XP SP2. I ran the wizard in VS Developer and created a personal website sample. When I hit CTR + F5 to test drive the sample website, it gives me the following error: Server Error in '/WebSite2' Application. An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server). I now realize that the SQL Server is stopped. When I tried to start the SQL server in the manager console, I get the following error log: ...Show All
Visual C# convert double[] to byte??
is this possible i need to convert an array of double to byte so that i can put it in a database.. thank you! Well that would make the column where the double[] are stored of type "OLE Object" (ADO.NET returns that column as byte array and allows to set a byte array!). Next my code to convert the doubles to byte[] should be used to create a byte array. The following two methods convert a double[] to byte[] and a byte[] back to double[] private static double [] ConvertByteArrayToDoubleArray( byte [] value) { if (value == null ) throw new ArgumentNullException ( "value" ); // Create an array that holds the results. double [] result = new double [value.Length / 8]; ...Show All
