abdm's Q&A profile
Game Technologies: DirectX, XNA, XACT, etc. Dramatic memory leak in DrawText
I've been banging my head against the wall for the last few days trying to track down the source of a rather big memory leak in my Direct3D-application. Turns out the culprit seems to be the DrawText function. Let me explain exactly what happens: I'm using a variable width truetype font (Times New Roman) created through D3DXCreateFont. I'm using this in various parts of my application, but the part where the problems are easiest to notice is in my custom UI textboxes. I use a function called InsertText to add new characters to the printed string, and everything I initialize is cleaned up properly afterwards. The problems only truly beg ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Mesh Intersect Confusion
EDIT: Let me make my question simpler: How do I shoot a ray (using the Intersect function) from one mesh to another mesh Original Post: I recently found out that the Mesh.Intersect function requires you to transform the ray by the inverse of the Mesh's matrix. I can kinda understand how this works with picking, but, I am trying to shoot a ray from one mesh to another with an arbitrary direction. Now I'm dealing with TWO matrices, not just one. Right now I am taking a point from the "source" mesh, transforming it by the inverse of the "destination" mesh's matrix minus the "source" mesh, then calling the "destination" mesh ...Show All
SQL Server Problem converting VS2003 code to VS2005
Hi: I am trying to convert my VS2003 project to VS2005 beta 2. The actual conversion has gone fine, but some code that was working fine under to old IDE is now giving me an exception when run under the VS2005 generated code. The code is: using ( SqlConnection conn = new SqlConnection ("Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=GestionNET00001;Data Source=localhost" ) { ... } And the error I'm getting is: {"The type initializer for 'System.Data.SqlClient.SqlConnection' threw an exception."} Has anyone any idea why this is happening TIA, MartinH. It's not a bug -- the confusing thing was w ...Show All
Visual C# system.drawing in VS 2005 ???
Hello everybody, I am (still) discovering VS 2005, and when I find some interesting code on the net it is, for 90% of it, from VS 2003... and I got a little but simple problem with the using... I got a using system.drawing in a code I found recently, but vs2005 doesn't know this namespace... could anyone tell me what is the path of the namespace in the latest version of VS. Thank you. don't forget : LIFE IS A PARTY :-) ENJOY IT. ...Show All
Software Development for Windows Vista Which style should I use for such workflow?
I have a workflow working like this: It is basically linear from activity 1 to activity 2, activity 2 to activity 3, ....activity n-1 to activity n . But it is possible from activity n to go back to activity n-1. Is there a simple way to handle this in WWF framework Thanks, Chester Chester, You can either use the State Machine Workflow and model your activities in discrete states (once you're in the last state, you can set-state back to the first state), or you could develop a custom workflow model with your own execution logic, like the one Ramraj and I created - http://forums.microsof ...Show All
Visual Studio Build Engine BuildProjectFile
How do I call the BuildEngine.BuildProjectFile specifying Release or Debug configuration Below does not work. Also specifying Build target just doesn't seem right. Is there something I am missing Hashtable table = new Hashtable (); table[ "Configuration" ] = "Release" ; Boolean success = engine.BuildProjectFile( @"C:\Code\WindowsApplication3\WindowsApplication3.sln" , new String [] { "Build" }, null , table); Got it BuildPropertyGroup group = new BuildPropertyGroup (); group.SetProperty( "Configuration" , "Release" ); Boolean success = engine.BuildProjectFile( ...Show All
Windows Forms A future for Windows Forms?
With the .NET Framework version 3.0 with WPF coming up, and Visual Studio "Orcas" around the corner, are there any plans for enhancing and extending the Windows Forms technology, or is this a more or less "dead" technology when it comes to updates Thanks, Eyvind. If you have seen the New Diagram of .Net Framework 3.0 on Somasegar Blog, you can see that WinForms are side by side to WPF, so still WinForms have a way to go. ...Show All
SQL Server Help! hresult DTS_E_VARIABLEALREADYONREADLIST
We have a SSIS package that intermittently fails on the deployed server (works fine on our dev server) with the following error: "The variable "%1!s!" is already on the read list. A variable may only be added once to either the read lock list or the write lock list." This seems to happen right at the start when the variables are processed before any tasks happen. It also only fails half the time. I just don't even know where to begin. Any clues I also want to add that not only does it fail only some of the time it also fails on different variables, always on an expression and always at th ...Show All
Windows Forms Using HelpNavigator to show the 'home' page of a CHM
When building a CHM, you can specify a 'home' page - the page which is displayed when the 'Home' button is clicked. Unfortunately it doesn't look like the HelpNavigator enumeration supports navigating to the 'home' page. Of course the workaround is the define the URL string for the home page in your app somewhere as a string and navigate to that when you want to display the home page. However, since this information is actually stored in the CHM, it would be useful not to have to redefine this in every app that opens a CHM. It would also improve maintainabililty of the code (in case the home page changes in the CHM). Does anyone know if the ...Show All
SQL Server Can we secure specific snapshots?
Dear Anyone, Is there a way to place some sort of security on a snapshot level Each snapshot of a report has specific security preferences such as specific users for each snapshot Thanks, Joseph Hi Joseph. No -- You can't do this. You'd have to secure the report instead. This is an interesting scenario, however... Why would it be OK for 'user1' to see a snapshot of data for one time period, but not for another ...Show All
Smart Device Development How to shut off PDA (wince ) background light by prgoram ?
I just want to shut off background light temporary , not permanent . it mean when I touch the screen of pda or hit the keyboard , background light can light again . I know the power button of pda can shut off the light , but it also let pda sleep , it would pause the current program , but it is not I want to do . thanks for your help ! calvin no , when I set off background light in the standard power settings menu . it can not light up when I touch the screen or hit the keyboard button . do you know what I mean ...Show All
Visual Studio Express Editions 3D real time models
I have this problem to solve, hope that you can help me: I have a building with a “control system”. The control system, depending of the temperature inside and outside the building, opens and closes windows automatically. I want to create a 3D model of the building that displays in real time the processing mode of the building (temperature inside and outside, windows that are open and closed, etc). For that I have to interconnect the “control system” of the building with a computer. The control system gives data temperature inside and outside, windows that are open and closed, etc) in format txt. I want also to be able to use ...Show All
SQL Server SQL reporting services 2005 with CLR
Hi, I am trying to use reporting services 2005 with a VB SQL stored procedure that i created in visual studio using CLR. The stored procedure was created successfuly in SQL server but while linking the report to the stored procedure, i am receiving the following message "An error occurred while retrieving the parameters in the query. The stored procedure 'mysp' doesn't exist. Thanxs in advance No i didn't my sp is: Dim command As New SqlCommand( "SELECT * FROM BDLC8PF" , connection) Dim reader As SqlDataReader reader = command.ExecuteReader() ' SqlConte ...Show All
Visual Basic Disabling specific controls
I used this code to disable all of the controls in a tab...Now I want it that only certain specific controls(e.g. textbox and datagridview) to be disabled...And one more thing, is there any way as how can I change the appearance of the disabled controls It seems that whatever color I use, nothing change..Plese enlighten me...thanks. For Each clsControl As Control In tabEditPatient.Controls clsControl.Enabled = False clsControl.ForeColor = Color.Green clsControl.BackColor = Color.AliceBlue Next Why cant you simply do something like the following Sub PartialDisable ...Show All
.NET Development OnKeyPress
I have a form in which a user enters a number into the textbox and clicks the search button, and then the user gets results. How do i make it to where when the return key is pressed and the user is inside the texbox it does the same as clicking on the button. Thanks In ASP.NET 2.0 you can use the “default button” property of <form> or <asp:panel> control. If you are having issue with the lower version write script to capture the enter key using keycode and postback the page to the server using dopostback method by passing you search button id as one of the parameter. Regards, Jimmy ...Show All
