Skipping Rock's Q&A profile
Game Technologies: DirectX, XNA, XACT, etc. SceneItem Improvement (?)
i got a bit frustrated by the fact that you can't do anything to a SceneItem once you call into it's Update() routine, so i made a small change that should help. i figured i'd share it in case anyone else finds it useful. inside the SceneItem.Update() method, you will find a foreach() call that runs through the list of sub-items. pull out that loop and put this in: List<SceneItem> lsi = this; //Update each child item foreach (SceneItem item in lsi) { item.Update(time, elapsedTime); } a good example of why you want this is when one objects wants to die but replace itself with another. calling Parent.Add(new Yada()) would normally cause an exception because you can't change a list from within a for ...Show All
Visual C++ Visual C++ 2005 Precompiled Header Bug?
Hello, I have converted a project from Visual Studio 2003 to Visual Studio 2005 and noticed the following problem: Changing a header file does not recompile all the required dependants. This happens only with precompiled headers on, when I turn them off, everything works. This did not happen in Visual Studio 2003. (Minimal / Incremental Build are OFF). It is most problemtic when what changed in the header are flags, since it links properly the project is built with some files not updated and creates the most obscure bugs. Example (just for problem illustration): Test.h: #define FLAG_ONE 1 #define FLAG_TWO 2 Files TestFile.c and TestFile2.c both use the header and flags, I edit Test.h and remove FLAG_ONE definition -> ...Show All
Visual Studio Team System Schema Compare - Plumbling for Transaction Support Bug?
When I do a schema compare, I have 'Include SQL plumbling for transactional synchronization scripts' unchecked. IOW, I do not want my scripts to contain any transaction support. However, I've noticed in some cases, DBPro adds transaction support anyway. It doesn't do it for the entire script but only in those cases where DBPro decides to rebuild a table (such as when column orders in a table between source and target are not the same). Below is an example. This was generated with the Plumbling option turned off. Is this a bug Thanks - Amos. --------------------------------------------------------------------------------------------------------- PRINT N 'Rebuilding [dbo].[ProjectBillingSchedule]' GO SET TRANSACTION ISOLATION ...Show All
Visual C# Command Line Arguments
I'm writing a console program in C#. I'm attempting to see if the user sets a command line argument using code like this: static void Main(string[] args) { if ( args[0] == "nogui") { //start in quiet mode } } The only problem with the above approach is if there isn't a command line argument, it throws an exception because it exceeds the boundry of args. Does anyone know of a better way to check for command line arguments Try: static void Main(string[] args) { switch(args.Length) { case 0: // code for no arguments break; case 1: // code for one argument break; case 2: //code for two argument break; // etc.. etc.. etc.. default: //code for unrecognized number ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Smoke Image Problem?
Hi all, i found smoke Image in internet, But the image background is black color, How to set black color to transparency(C#) Best Regard, The state given above are necessary You also need a Texture that load with a Alpha value like RGBA Once you get this you would need to LoadTextureFromFileEx() that let you specify a Alpha color key But watch out for this value because you need to specify a Alpha component in this colorkey Remember that if your original texture do not include a alpha value it is Opaque and the value of black opaque is 0x000000FF and not 0x00000000 Black opaque have a alpha of 1... So the colorkey must be defined opaque (alpha 1) to detect your black in your texture... Once th ...Show All
Visual C# Apply Button On Modal ShowDialog Form
Hi all, Let say I have two forms. One is the Main form. Another is the Options form. My Options form is called by the Main using ShowDialog() command. I have an apply button on the Options form that allow user preview / apply the Options that they had set without closing the Options form. The is another OK button on the Options form. The OK button will Hide() the Options form. Then, it will execute the "ANOTHER CODE REGION". That is what I wish to do without hiding the Options form. Is it possible with the ShowDialog() function frmOptions frm = new frmOptions(); frm.ShowDialog(); // ANOTHER CODE REGION that draw something on the main form. Thanks in advance. Export the 'apply method' ie anoth ...Show All
Visual Studio Express Editions key confused
I am trying to make a project in which when i press a key on my keyboard ( let's say the z key ) it adds plus 1 to a variable ( lets say the variable's name is runningCount ). Can someone help me. Thanks. I find this interesting as I have a form with MANY controls and about 70 buttons. applying your code works perfectly for me, even if a button has focus or a control has focus. feel free to send over the project (email in profile) and i will be sure to post back the solution again, im concerned about the fact that you may have 2 keydown events on the form and none of them are actually assigned to the form keydown event ...Show All
.NET Development Web Method returns array of custom type : casting error
Hi group, I am having a web service which returns an array of type custom object. The custom class is defined in a Class Library that is included in the web-service project. The same class lib is included in the ASP.NET Web Application that calls the web-method. it gives type cast error when i try to call the web method of my webservice. Cannot implicitly convert type 'wsMyProjectName.Employee[] to 'MyProjectName.Domain.Employee[]' i think the problem is What the web method is returning is a proxy-type, and not the type that web service originally returned. i am using vs.net 2005 and this happens while i am doing this through adding web reference. I tried creating proxy class using wsdl.exe manually and used that also but it gives diffe ...Show All
Visual Studio Team System % CPU usage
Hi. Hopefully, this is a very quick to answer question. I have a load test and want to measure % CPU used. I can't find which performance counter I can use to do that. I've read in the help files that you can do that, so I think I'm just not looking in the right places. Thank you. In addition... the Processor,%Processor Time,_Total counter is included in almost every predefined counter set in the load test. When the load test is running look under the "Machines" node in the performance counter pane (upper left pane) to find Processors category. Thanks, Rick ...Show All
Visual C++ Error code ExplorerEXE. (0xc0150002)
>Inspiron 2200 Problem: Computer >Operating System: Windows XP Problem Description: >Explorer.EXE - Application Error The application failed to >initialize properly (0xc0150002). Click on OK to terminate the >application every time i switch my lap top on , >a screen tells me to Log on to Windows. after i have clicked on enter >the next screen appears saying that the aplication failed to >initialize properly (0xc0150002). Click on OK to terminate the >application. when i do nothing happens >Ihave followed all on screen instructions but nothing happens. i'm >frozen out of my computer, all i can see is a desk top picture. I have contacted DELL but no joy :( ...Show All
Visual C++ Building standard unmanaged win32 DLL which calls functions in a managed C# library
Hi, I would like to build a standard DLL which calls managed code library. Is it possible If possible, how Can anyone provides some references to online resources With many thanks. Ok, yeah you are having a bit of a problem. The program.cs file is a C# file. When you add it to the C++ project, you are going to have huge problems because the C# code inside program.cs will be compiled with the C++ compiler. See where I'm going here So in order to get this to work, you need at least 3 projects. The C# project containing program.cs. It will output a DLL The C++ wrapper project. It will also output a DLL The native C++ project. (1) should just be compiled as you would any other C# project. (there is no /clr flag ...Show All
Windows Forms Inherits MyUsercontrol don't generate event code on myform
example: Class MyTextBox inherits system.windows.forms.TextBox .... .... end class Class MyTextBox2 inherits MyTextBox end class ---------------------------------------------- Now if i create a new Application Form, and drag "MyTextBox2" from Toolbox on a Form, the object created is without event!!! why Inherits clausole don't inherits event too if i drag "MyTextBox" also the object created contain withevents clausole and it work. Any solution ty to all :) You've got the wrong idea about what how a container works. Example: a form is a container for controls. The Form class is derived from the Control class, it is *not* a nested type of the Con ...Show All
SQL Server SQL Mobile create sdf file from SQL 2005 DB
Hi, I'm trying to create a SQL Mobile .sdf file from my SQL Server 2005 database and cannot. I read the ms support docs for doing this and have had no luck . I created the respective publication and SQL Subscription for the db and when i run the process (not sure if i'm running the right process - docs don't say) it creates a directory under a "unc" directory with all my table objects (articles) with subscription/replication files for each table such as .cft, .bcp, .dri, .prc, .sch, and .trg. But no .sdf file for my SQL Server 2005 database. All I want is the .sdf file so that i can copy it to my Pocket PC device and then connect my mobile application to it. I want to copy my SQL Server 2005 database to my device so that t ...Show All
SQL Server How to form a list ?
Hi, I have a table like this: CatalogID CatalogName RootID -------------------------------------------------- 1 Microsoft 0 2 Macromedia 0 3 Office 1 4 ...Show All
Game Technologies: DirectX, XNA, XACT, etc. windows and xbox 360 / xbox live vision
i have a question about the xna game studio. if i was to write a simple game like pong or tetris for the current build on windows xp, will that run straight on the 360 when the dev kit comes out also i heard early 2007. will that be january or so another question is will we have access to the xbox live vision library to make games with motion sensing thanks I seriously doubt they'll add support for Live Vision until the Full version of Game Studio is out, or even after if they let us use it at all. Maybe talk to Dave Weller, Mitch Walker or Michael Klutcher. They're only a few of the people from inside Microsoft that post on the forums, and they seem to know a lot about the future of XNA a ...Show All
