tchen777's Q&A profile
Game Technologies: DirectX, XNA, XACT, etc. Video/Animation Playback - Release #1!
Hi, I'm currently writing a library (for XNA/DirectX) for animation/soundless video playback, and I have a few design questions for the pros out there if you don't mind answering them : I'm having my animation class inherit from game component, and update the frame depending on game time in the overriden Update method, and render it in the overidden Draw method, but even when I preload my textures to render, playback is choppy. Not sure exactly why, but I notice this only when I have significant number of frames (I noticed it with 100 frames, but *not* with 10/15). This problem may be linked and solved by the 2nd point, so please read on. When I preload all the textures for the frames in the animation (and the no. of frames ...Show All
Visual Basic Passing a Structure
I am attempting to pass a structure from one DLL to another. The Structures are identically define in each DLL (Cut-and-Paste), but compiler complains it cannot convert types. I've tried the usual 'fixes' -- moving code around, changing ByVal to ByRef, etc., etc., etc. No Help. Any ideas ERROR: Value of type 'LPM.Menu.User_Data' cannot be converted to 'SS.clsUpdates.User_Data' <CODE> ' ' In One DLL ' Public Class Menu #Region "Structures" Public Structure User_Data Dim ID As Integer Dim Role As String Dim Preferences As String End Structure #End Region #Region "Variables" Public UserData As User_Data #End Region #Region "Update" Priv ...Show All
Visual Studio Team System Importing schema causes full crash in CTP5 (but worked fine with CTP4)
I had just upgraded from CTP4 to CTP5 and am now having crashing problem (full crash, have to restart VS) trying to import a schema. It was not never a problem importing this same schema in CTP4. Any ideas Thanks I've tried to use the compare schema feature to generate the script, but VS crashed before anything could be generated. I did some more testing and find that this was not a problem when I imported a VERY simple VS 2005 database (1 table, with some data row), which hopefully proves that the environment is correctly setup and that the problem could be with the content of the database I am trying to import that is causing problem. Also, here is some more information about the error: ...Show All
Windows Forms WebBrowser && HeavyOutput
Hi, i'm currently using WebBrowser control for heavily text output, but problem is, when there many lines, like about 10k or more, it's getting to eat more and more of your ram, so question is, how to do, then there could be maximum lines (999) in webbrowser, so if i try to output one more line, it deletes first line, then adds new line, and so on Yes, i will just delete everytime there is more than 200 lines, the second line if (this.Document.Body.Children.Count > 2) { //this.Document.Body.Children[1].InnerHtml = ""; //this.Document.Body.Children[1].InnerText = ""; this.Document.Body.Children[1].OuterHtml = ""; //this.Document.Body.Ch ...Show All
Visual Studio How can I separate the test code from the source code
our company is planing to introduce unit test into our development phrase.We mainly use Nunit as our test autuomation tool.If we mix the test code with the source code,that is to say, put the test code in the same .cs file with the source code, and we don't want the release build containing the test code, we must separate them when producing the release build.Can we use the preprocess sentences in C# (#define etc.) to wrap our test code, and tell the compiler not to compile the test code when making the release build If so,then we don't need to separate them at all. Thanks for help. Hi Peggy. This forum is for source control. You might get better responses elsewhere. Anyway, #ifdef is one way to keep un ...Show All
Windows Forms Null DateTime value
HI, I have a datagrid which displays DateTime of a call and the message. Some case there is no date value stored in the database. I have created a DataTable with DataColumn type of DateTime. When I read through and I parse the values as DateTime so it can be sortable by Date. I am running into this error when it fails to Parse when there is no value for Date. How can I over come this Please help! You can always use the DataRow.IsNull or DataReader.IsDBNull method to see if is a null before trying to get the date. ...Show All
SQL Server Assign XML to variable
How do I assign XmlDocument results to a variable (so that I can pass it to a sp) I know that the following code works.... select * from tblUsers where userId = 1225 for XML raw It returns "<row UserId="1225" LastName="Evans" FirstName="Stephanie" MiddleInitial=...."), which is what I want. But when I try to assign it, I get an error "Incorrect syntax near 'XML'." declare @strXml nvarchar(1000) set @strXml = (select * from tblUsers where userId = 1225 for XML raw) Ideas It is not possible to do this in SQL Server 2000 using TSQL. You cannot consume the XML output on the server-side in any form. This is possible in SQL Server 2005 since ...Show All
Visual Studio 2008 (Pre-release) Changing WCF Endpoint at Runtime
I have a WCF simple service (ServiceA) that I have running on Machine A. I have a client that accesses that Service on Machine A at ( http://MachineA/ServiceA/ ). Simnple enough. Now I have ServiceA running on 4 machines on my network. I still have the client on MachineA. I need to enable the user to connect to any of the 4 machines and call ServiceA. SO basically I need to be able to set the endpoint in code dependant on a selection from the user out of a pool of x machines that would all be running ServiceA. Anyone have a good way to do this with a WCF based service Answered by own question. I added an additional endpoint entry identical to the others with the URLs of my other server machines ...Show All
Visual Studio Express Editions Script Control Help Please
Good morning, I hope to get some advice, council and wisdom about the MS Script Control 1.0. I have not been able to find a reference that deals with implementing this control in a VB 2005 application. In my application I want to evaluate an expression which has been entered in a TextBox and include a variable from VB. Here is the code that has been giving me a problem. Dim tbText As String = """String1 "" & V1 & ""String2""" Dim txt As String = "GrandpaB " ‘mScriptControl.AddCode("V1=" & txt) mScriptControl.ExecuteStatement( "V1=" & txt) TextBox1.Text = mScriptControl.Eval(tbText) In the app ...Show All
Visual Studio Customized Shape
Hi all, I'm doing DSL project about Image Processing Graph Editor right now. My question is just simple, can I make a drop-down list for a property in the geometry shape Cheers, Herru Hi, I came up with something else. So the main idea is just to have specified values for Room domain-property: RoomSize. I decided to play with the properties field. I tried to set the Custom Attributes of RoomSize so then I can have set of values. But I didnt find the correct attributes class for that. I used System.ComponentModel. Category ( ) to set the categories of my properties, and System.ComponentModel. Description () eto make the descriptions. Do you guys know which class should I use Thanks! Herru ...Show All
Windows Forms DetailsView Databound event
Hi all, Should need some help on this : I have a Detailsview "ProductDetails" where some labels have custom formatting, i.e.: < asp : Label ID ="absoluteMargin" runat ="server" OnDataBinding ="ProductDetails_DataBound"></ asp : Label > The formatting occurs when the data is bound. This is only used in the Itemtemplate created for the productinfo. The InsertTemplate should do no formatting because there is no data (yet). But it seems that de ProductsDetails Itemtemplate also reacts on the insert command. I get the exception: "Object reference not set to an intance of an object" for the ProductDetails.DataItem. The Productsdetails_Databound() shou ...Show All
Visual C++ The error Message "This application has failed to start because MSVCR80.dll was not found. Re-installing ..."
Dear Forum Members After installing Intel OpenCV 1.0 library, I got the error message "This application has failed to start because MSVCR80.dll was not found. Re-installing ..." for an application which is linked with this library in VC++ 8.0. I repaired VS 2005 installation. The required Dll is available under the MS VS205 several directories. But the error still continues. What can be the possible cause for this error and How can I fix this Sincerely Cem DEMiRKIR Project directory : "\Interface" Executable : " \Interface\debug\Interface.exe" My manifest name "\Interface\Interface\Debug\Interface.exe.intermediate.manifest" : < xml version='1.0' encoding='UTF-8' standalone= ...Show All
Game Technologies: DirectX, XNA, XACT, etc. XNA Breakout
Hello, I have about a year of experence with C# and I have tried a simple game using XNA, I made breakout with some crappy homemade graphics Would anyone mind to look at my code and tell me what I could do better with Note: The game is not completely done yet but for the most part, it works. Code is at http://joshmackey.net/programming/XNA/XNA%20Breakout/ I do have to ask, how can I lock the mouse in the window I don't want the mouse to be able to move outside the game window while the game is actually playing. ...Show All
Visual Studio Local Report Rendering - leading spaces truncated
Hi, The leading spaces from the data are being truncated when I render the local report. However, if I preview the same data in a server report, the leading spaces are not truncated from the data. I need to use local reports and at the same time need to display the leading spaces with my data. Any ideas/suggestions will be helpful! Thanks Note: I exported the same report to excel and the leading spaces are not truncated. ...Show All
Visual C# Access Controls or Variables on Other Forms: Part II, Attack of the Forms
Okay, well anyways, you probably remember I posted a thread about this. But....what if I want to access the methods and properties on a form that hasn't been launched from the current form. Let's say there is an options form and a customization form, neither of which are the default forms. I want the options form to modify something, such as background color, of the customize form. How would I go about that I used form2 instance = new form2(this); instance.Show(); but I can't do that because they arent laucnhed from one another... the same things would apply as last time. you would create a class, and just access its properties/methods as long as they are declared as public. If its not launched, then thats fine too - you dont ne ...Show All
