CarlosV's Q&A profile
Game Technologies: DirectX, XNA, XACT, etc. Sprite Doesn't Animate
Alrighty, here we go again with another problem. I used to use a simple sprite sheet, but in recent days I have found I need to add some more functionality. My previous spritesheet class would load a sheet which had all frames have the same height and width. They were laid out horizontally, and the height and width were hardcoded. It worked, but I wanted to make a sprite sheet loader that could load and animate any sprite sheet, provided there was an XML document to explain where to look on the sheet. Thus, the actual frames can be anywhere on the sheet, in any order, just so long as the XML file is correct. So, I wrote that class. Now, come time to test it, the animation part of it doesn't work. Hard coding a frame to use shows that ...Show All
Visual Basic From ado 6 to ado .net 2.0
Dear all, I wonder how do this in the best/optimum way. That’s inherited Visual Basic 6 snippet of code: ObjConexion.Execute "update…..” ObjConexion.Execute "Insert into…” ObjConexion.Execute "update…” Where objConexion is an ADO 6 connection object. Thanks in advance, Use a DataSet and a DataAdapter http://msdn.microsoft.com/library/default.asp url=/library/en-us/cpguide/html/cpconupdatingdatabasewithdataadapterdataset.asp ...Show All
Software Development for Windows Vista Workflow properties when debugging
Hi, I am debugging a workflow winform application in Visual Studio, and was expecting to be able to monitor the values of workflow properties as I step through. This does not seem to be the case though. Does anyone know if this is by design or not Thanks and regards, /Valur If you workflows are in a workflow library you need to set it as the startup project in order to invoke the workflow debugger. On the project properties for your workflow project, set the startup to start the debug build of your winform exe. Matt ...Show All
Visual Studio How can I output a comma delimited list of value from multiple records?
I need to loop through a datatable and output a list of values as a comma delimited string into a textbox. The Table and List controls output the values horizontally. I need the values of a specific field in my DataTable to display like "value1, value2, value3, etc." in a textbox. Is this possible Were you able to figure this out I'm trying to accomplish the exact same thing. Does anyone have any ideas Thanks Josh ...Show All
Visual C# How to catch Exception that throw by timer
I have a WinForm application and a timer inside. The timer will throw an Exception while event Elapsed. How can I catch this Exception in WinForm Following CAN'T work: try { Application.Run(new Form1()); } catch { System.Diagnostics.Debug.WriteLine("error occurs."); } ... System.Timers.Timer t = new System.Timers.Timer(); t.Enabled = true; t.Interval = 5*1000; t.Elapsed += new System.Timers.ElapsedEventHandler(this.timer1_Elapsed); ... private void timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e) { System.Diagnostics.Debug.WriteLine("time1_Elapsed"); int.Parse("R"); System.Diagnostics.Debug.WriteLine("no exception"); } I think I should do it in other way. ...Show All
Smart Device Development Validating expressions
How do i validate an expression in a device application, for example an e-mail address. I remember that in asp.net projects i was using the regular expression validator. What about here I could not find such a thing. Thx in advance. In the toolbox I right-clicked and selected "Show All". And it appears. However it is not selectable... that is the problem... ...Show All
Windows Forms Add Serial Number column DataGrid 1.1
Hi! I am using the DataGrid control in framework 1.1. What i need to do is add an additional column in the DataGrid which display the serial number for each row. This column(field) has no relation or value in the table i will bind the gird to, but will only be used for display puposes. I have looked at How to dynamically number rows in a SELECT Transact-SQL statement . and also creating stored procedures that will create a new identity field and put that data into a temp table from which i can bind the grid. They dont however solve my problem. Is there a simpler way of doing this Any help would be appreciated. thanks, Rohan (plonk) i was adding the column after filling the dataset, no wonder it wasnt showing up. ...Show All
SQL Server Need help to build the MDX query please?
I need help on how to do this in MDX query. I have an OLAP cube with the following structure as an example Measures: M Dimension A: Attritute 1, Attritute 2, Attritute 3 Dimension B: Attritute 4, Attritute 5 (date/time) Dimension C: Attritute 6, Attritute 7 I need the dataset with all the attritutes and measures of this cube for the Reporting Services. First of all Attritute 1 and Attritute 5 are the parameters (cascade prompt) for the report. Based on this parameters it will filter out the Attritute 6 to a smaller subset of the original data. Then I need to apply the Attritute 1 (again) and the "filtered" Attritute 6 to filter out the cube data with the condition that Attritute 5 is less than or equal to the Attritute 5 selected ...Show All
Visual Studio Express Editions array of checkboxes
Hi! I have an application in VB that ues an array of chekbox, like.. If chkSD(Index).Value = 0 Then MsgBox "Caution!" Else chkSD(Index).Value = 0 End If And now i am rewriting everything into VB .NET but there are few things that i can't find.. But i suppose that they have to exist in VB .NET, to. Is there any way of making an array of checkbox like in VB Thanks!! Yes. Everything is basically the same except that you don't have designer support for Indexed arrayed controls. So you would need to create the controls, add them to a container and position them yourself. ...Show All
SQL Server Matrix SSAS dimension/hierarchy order problem
I have a have a relatively simple SSAS cube that I'm trying to display in a matrix but the order of the data is not correct. The rows of the matrix are a time hierarchy and the query designer produces the correct MDX and when I run the MDX in the data tab, the order is correct. However in the report preview tab, the order is incorrect. Specifically, the time hierarchy looks like this Year-Month-FullDate . The report is ordering the Months like this 1,10,11,12,2,3,4,5,6,7,8,9. I ran the MDX query in Sql Studio and the order is correct, and I used Excel to consume the same cube and it produces the correct order. The report is somehow treating the Month like character data instead of numeric, how do I fix this ...Show All
.NET Development Passing Parameters with Web Services
I am trying to pass user logins through web services I want to have a login screen where the web services grabs the users login from the database and procceed if the user login is successful. Here is my web method I don't know if I am missing anything.... Thanks <WebMethod()> _ Public Function GetLogin() As DataSet1.UsernamesDataTable Return DA.GetData End Function ...Show All
SQL Server how to write this sql
I have table T1 with fields T1.ID, T1.CheckBoxCol The T2 tabel has the same ID as T2.ID and T2.CheckBox1, T2.CheckBox2, T2. CheckBox3 Now, I need to check T1 and if T1.CheckBoxCol=1 then set T2.CheckBox1=1 else if T1.CheckBoxCol=2 then set T2.CheckBox2=1 else if T1.CheckBoxCol=3 then set T2.CheckBox3=1 for each T1.ID How can I do this UPDATE T2 SET CHECKBOX1 = (CASE WHEN T1.CHECKBOXCOL = 1 THEN 1 ELSE 0 END) , CHECKBOX2 = (CASE WHEN T1.CHECKBOXCOL = 2 THEN 1 ELSE 0 END) , CHECKBOX3 = (CASE WHEN T1.CHECKBOXCOL = 3 THEN 1 ELSE 0 END) FROM T2 JOIN T1 ON T1.ID = T2.ID ...Show All
Software Development for Windows Vista Problem with SetTokenInformation (cannot set session id information)
Hi, I have a service that works fine under XP and that needs to launch a process in a given session (not necessarily 0). No communication needed, I just have to launch (inject) the process in the user's session. This is done as follows: OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY | TOKEN_ADJUST_PRIVILEGES | TOKEN_ADJUST_SESSIONID | TOKEN_ADJUST_DEFAULT | TOKEN_ASSIGN_PRIMARY | TOKEN_DUPLICATE, &hToken)) LookupPrivilegeValue(NULL, SE_TCB_NAME, &tp.Privileges[0].Luid)) AdjustTokenPrivileges(hToken, FALSE, &tp, 0, NULL, 0) SetTokenInformation(hToken, TokenSessionId, &m_dwActiveSession, sizeof(DWORD)) CreateProcessAsUser(hToken,... Under Vista, everything works fine except SetTokenInformation that ret ...Show All
Game Technologies: DirectX, XNA, XACT, etc. XACT - System.TypeInitializationException on start-up
Anyone else seen this problem starting up XACT It worked in the past but I haven't used it for a few weeks. In the interim, I've installed the Vista SDK, .NET Framework 3.0, WF and WCF extensions for Visual Studio etc. I've uninstalled all these components and reinstalled GSE and Visual Studio Express but still get the same exception on start-up. In the debugger, I see Additional Information: System.Net.Dns threw an exception. I built a quick program to check I could use this class and it worked OK. I'm going to post a duplicate of this question on the XACT forum. Help ! Cheers. Just to close this thread down, I 'fixed' the problem by uninstalling the .NET Framework 1.1 and .NET Framework 2.0 and .NET Framework 3.0 and V ...Show All
Software Development for Windows Vista help on Pinnacle PCTV Stereo install for vista
Hello! Sorry about so many questions by me, but i just installed vista rc 2 today and i have lots of questions :) I want to know if it will be possible to install and use my pinnacle pctv stereo tv tuner card with vista do i need special drivers where can i find them/ Thanks! see http://www.pinnaclesys.com/vista/vista.asp GRTz Trappie ...Show All
